Browse Source

stop crash from null objects at exit, part duex b

JimMarlowe 9 years ago
parent
commit
63fb5b7b94
1 changed files with 3 additions and 2 deletions
  1. 3 2
      Source/Atomic/Engine/Engine.cpp

+ 3 - 2
Source/Atomic/Engine/Engine.cpp

@@ -495,8 +495,9 @@ void Engine::RunFrame()
 
 // ATOMIC BEGIN
 
-    if ( exiting_ ) // exit check for script event handlers
-        return;
+    // check for exit again that comes in thru an event handler
+    if ( exiting_ ) // needed to prevent scripts running the 
+        return;     // current frame update with null objects
 
     // If paused, or pause when minimized -mode is in use, stop updates and audio as necessary
     if ((paused_ && !runNextPausedFrame_) ||