mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24: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]);
|
Con::errorf(ConsoleLogEntry::General, "%s: Unable to instantiate non-SimObject class %s.", getFileLine(ip), (const char*)callArgv[1]);
|
||||||
delete object;
|
delete object;
|
||||||
|
currentNewObject = NULL;
|
||||||
ip = failJump;
|
ip = failJump;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -902,6 +903,7 @@ breakContinue:
|
||||||
|
|
||||||
// Fail to create the object.
|
// Fail to create the object.
|
||||||
delete object;
|
delete object;
|
||||||
|
currentNewObject = NULL;
|
||||||
ip = failJump;
|
ip = failJump;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -1016,6 +1018,7 @@ breakContinue:
|
||||||
Con::errorf(ConsoleLogEntry::General, "%s: preload failed for %s: %s.", getFileLine(ip),
|
Con::errorf(ConsoleLogEntry::General, "%s: preload failed for %s: %s.", getFileLine(ip),
|
||||||
currentNewObject->getName(), errorStr.c_str());
|
currentNewObject->getName(), errorStr.c_str());
|
||||||
dataBlock->deleteObject();
|
dataBlock->deleteObject();
|
||||||
|
currentNewObject = NULL;
|
||||||
ip = failJump;
|
ip = failJump;
|
||||||
|
|
||||||
// Prevent stack value corruption
|
// Prevent stack value corruption
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue