mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
NULL out an object variable if it fails to register.
This commit is contained in:
parent
55c0a748b4
commit
6d93e96dc3
1 changed files with 1 additions and 0 deletions
|
|
@ -1087,6 +1087,7 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
|
|||
// This error is usually caused by failing to call Parent::initPersistFields in the class' initPersistFields().
|
||||
Con::warnf(ConsoleLogEntry::General, "%s: Register object failed for object %s of class %s.", getFileLine(ip - 2), currentNewObject->getName(), currentNewObject->getClassName());
|
||||
delete currentNewObject;
|
||||
currentNewObject = NULL;
|
||||
ip = failJump;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue