mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-07 14:30:40 +00:00
Merge pull request #1645 from Areloch/NewObjectPointerCleanup
New object pointer cleanup
This commit is contained in:
commit
68d44c4c30
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue