Forgot to null out the datablock after being deleted when it fails to preload.

This commit is contained in:
Jeff Hutchinson 2021-09-11 15:16:36 -04:00
parent 772c0ae25b
commit 7f59bc6350

View file

@ -1103,6 +1103,7 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
Con::errorf(ConsoleLogEntry::General, "%s: preload failed for %s: %s.", getFileLine(ip - 2),
currentNewObject->getName(), errorStr.c_str());
dataBlock->deleteObject();
currentNewObject = NULL;
ip = failJump;
break;
}