浏览代码

small fix.

Jeff Hutchinson 4 年之前
父节点
当前提交
960db74733
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Engine/source/console/compiledEval.cpp

+ 2 - 1
Engine/source/console/compiledEval.cpp

@@ -763,6 +763,7 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
 
                   // Clean up...
                   delete object;
+                  currentNewObject = NULL;
                   ip = failJump;
                   break;
                }
@@ -1011,7 +1012,7 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
          if (currentNewObject)
             currentNewObject->onPostAdd();
 
-         //Assert( objectCreationStackIndex >= 0 );
+         AssertFatal( objectCreationStackIndex >= 0, "Object Stack is empty." );
          // Restore the object info from the stack [7/9/2007 Black]
          currentNewObject = objectCreationStack[--objectCreationStackIndex].newObject;
          failJump = objectCreationStack[objectCreationStackIndex].failJump;