소스 검색

- Only call the "onExit" method if it exists.

MelvMay-GG 12 년 전
부모
커밋
93be0d70ff
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      engine/source/game/defaultGame.cc

+ 3 - 2
engine/source/game/defaultGame.cc

@@ -326,8 +326,9 @@ void shutdownGame()
     if( Con::isFunction("onPreExit") )
     if( Con::isFunction("onPreExit") )
         Con::executef(1, "onPreExit");
         Con::executef(1, "onPreExit");
 
 
-    //exec the script onExit() function
-    Con::executef(1, "onExit");
+    // Perform the exit callback.
+    if( Con::isFunction("onExit") )
+        Con::executef(1, "onExit");
 
 
     // Unregister the module database.
     // Unregister the module database.
     ModuleDatabase.unregisterObject();
     ModuleDatabase.unregisterObject();