diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-23 12:28:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-23 12:28:28 +0400 |
commit | 28299d98fb93e87b2322d0533395254e2792a86f (patch) | |
tree | b32d6cff39d1cc5f31bfa1201b623dd24dde04ff /source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | |
parent | 4a999f9e96965bd4aa45ce4cdd5c225bbf901226 (diff) |
svn merge ^/trunk/blender -c58374 -c58406 -c58422 -c58427 -c58436 -c58440 -c58441 -c58463 -c58504 -c58509 -c58512 -c58513 -c58514 -c58516 -c58520 -c58532 -c58534v2.68a
Diffstat (limited to 'source/gameengine/GamePlayer/ghost/GPG_ghost.cpp')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index 2c642d4bd04..f1edb71f4fe 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -1031,10 +1031,9 @@ int main(int argc, char** argv) * removal is needed else the system will free an already freed value */ system->removeEventConsumer(&app); - /* nodesystem relies on blendfile data, free it first */ - free_nodesystem(); - BLO_blendfiledata_free(bfd); + /* G.main == bfd->main, it gets referenced in free_nodesystem so we can't have a dangling pointer */ + G.main = NULL; if (python_main) MEM_freeN(python_main); } } while (exitcode == KX_EXIT_REQUEST_RESTART_GAME || exitcode == KX_EXIT_REQUEST_START_OTHER_GAME); @@ -1052,6 +1051,13 @@ int main(int argc, char** argv) } } + /* refer to WM_exit_ext() and free_blender(), + * these are not called in the player but we need to match some of there behavior here, + * if the order of function calls or blenders state isn't matching that of blender proper, + * we may get troubles later on */ + + free_nodesystem(); + // Cleanup RNA_exit(); BLF_exit(); |