forked from Mirrors/openclonk
Do not print a deleted-object-warning while warning about that object
parent
abd1b13a5b
commit
a533b93f10
|
@ -749,7 +749,7 @@ void C4Object::SetOCF()
|
|||
if (Contained && !C4PropListNumbered::CheckPropList(Contained))
|
||||
{ LogF("Warning: contained in wild object %p!", static_cast<void*>(Contained)); }
|
||||
else if (Contained && !Contained->Status)
|
||||
{ LogF("Warning: contained in deleted object %p (%s)!", static_cast<void*>(Contained), Contained->GetName()); }
|
||||
{ LogF("Warning: contained in deleted object (#%d) (%s)!", Contained->Number, Contained->GetName()); }
|
||||
#endif
|
||||
// OCF_Normal: The OCF is never zero
|
||||
OCF=OCF_Normal;
|
||||
|
|
|
@ -79,7 +79,12 @@ StdStrBuf C4AulScriptContext::ReturnDump(StdStrBuf Dump)
|
|||
Dump.Append(Func->Owner->ScriptName);
|
||||
// Context
|
||||
if (Obj)
|
||||
Dump.AppendFormat(" (obj %s)", C4VObj(Obj).GetDataString().getData());
|
||||
{
|
||||
if (Obj->Status == C4OS_NORMAL)
|
||||
Dump.AppendFormat(" (obj #%d)", Obj->Number);
|
||||
else
|
||||
Dump.AppendFormat(" (obj (#%d))", Obj->Number);
|
||||
}
|
||||
else if (Func->Owner->Def != NULL)
|
||||
Dump.AppendFormat(" (def %s)", Func->Owner->Def->GetName());
|
||||
// Script
|
||||
|
|
|
@ -535,6 +535,9 @@ C4ID C4Value::getC4ID() const
|
|||
|
||||
void C4Value::LogDeletedObjectWarning(C4PropList * p)
|
||||
{
|
||||
LogF("Warning: using ptr on deleted object %p (%s)!", static_cast<void*>(p), p->GetName());
|
||||
if (p->GetPropListNumbered())
|
||||
LogF("Warning: using deleted object (#%d) (%s)!", p->GetPropListNumbered()->Number, p->GetName());
|
||||
else
|
||||
LogF("Warning: using deleted proplist %p (%s)!", static_cast<void*>(p), p->GetName());
|
||||
AulExec.LogCallStack();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue