mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Adds some pointer cleanup in the event we bail out of creating a new object for whatever reason.
This commit is contained in:
parent
0b178ec579
commit
3cfc6f787c
1 changed files with 2 additions and 0 deletions
|
|
@ -902,6 +902,7 @@ breakContinue:
|
|||
|
||||
// Fail to create the object.
|
||||
delete object;
|
||||
currentNewObject = NULL;
|
||||
ip = failJump;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1016,6 +1017,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