mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge pull request #1645 from Areloch/NewObjectPointerCleanup
New object pointer cleanup
This commit is contained in:
commit
68d44c4c30
|
|
@ -871,6 +871,7 @@ breakContinue:
|
|||
{
|
||||
Con::errorf(ConsoleLogEntry::General, "%s: Unable to instantiate non-SimObject class %s.", getFileLine(ip), (const char*)callArgv[1]);
|
||||
delete object;
|
||||
currentNewObject = NULL;
|
||||
ip = failJump;
|
||||
break;
|
||||
}
|
||||
|
|
@ -902,6 +903,7 @@ breakContinue:
|
|||
|
||||
// Fail to create the object.
|
||||
delete object;
|
||||
currentNewObject = NULL;
|
||||
ip = failJump;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1016,6 +1018,7 @@ breakContinue:
|
|||
Con::errorf(ConsoleLogEntry::General, "%s: preload failed for %s: %s.", getFileLine(ip),
|
||||
currentNewObject->getName(), errorStr.c_str());
|
||||
dataBlock->deleteObject();
|
||||
currentNewObject = NULL;
|
||||
ip = failJump;
|
||||
|
||||
// Prevent stack value corruption
|
||||
|
|
|
|||
Loading…
Reference in a new issue