From 7f59bc6350aa3637a1600b350996bcb4e622cc35 Mon Sep 17 00:00:00 2001 From: Jeff Hutchinson Date: Sat, 11 Sep 2021 15:16:36 -0400 Subject: [PATCH] Forgot to null out the datablock after being deleted when it fails to preload. --- Engine/source/console/compiledEval.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Engine/source/console/compiledEval.cpp b/Engine/source/console/compiledEval.cpp index a18729fd4..f33586676 100644 --- a/Engine/source/console/compiledEval.cpp +++ b/Engine/source/console/compiledEval.cpp @@ -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; }