Revision: 58949
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58949
Author:   moguri
Date:     2013-08-06 02:05:32 +0000 (Tue, 06 Aug 2013)
Log Message:
-----------
BGE: Making sure the BlenderPlayer calls Py_Finalize().

Modified Paths:
--------------
    trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp

Modified: trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp        
2013-08-06 01:45:29 UTC (rev 58948)
+++ trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp        
2013-08-06 02:05:32 UTC (rev 58949)
@@ -792,9 +792,6 @@
        }
 
        m_pyGlobalDictString_Length = 
saveGamePythonConfig(&m_pyGlobalDictString);
-       
-       // when exiting the mainloop
-       exitGamePythonScripting();
 #endif
        
        m_ketsjiengine->StopEngine();
@@ -808,6 +805,7 @@
                m_system->removeTimer(m_frameTimer);
                m_frameTimer = 0;
        }
+
        m_engineRunning = false;
 }
 
@@ -885,6 +883,11 @@
 
        GPU_extensions_exit();
 
+#ifdef WITH_PYTHON
+       // Call this after we're sure nothing needs Python anymore (e.g., 
destructors)
+       exitGamePlayerPythonScripting();
+#endif
+
        m_exitRequested = 0;
        m_engineInitialized = false;
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to