diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2011-05-29 08:15:35 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2011-05-29 08:15:35 +0400 |
commit | ebdca474b5fbbf5da23055e8cbaa1d2e491fb94d (patch) | |
tree | d5a71775560a83df75cf267538c2884130931624 /source | |
parent | fc3904d7b3189e4d201666464d71feba1619a36e (diff) |
Fixing the initglobals leak in the Blenderplayer (G.main reference was being reassigned before it was freed).
Diffstat (limited to 'source')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index 75181b6c330..7a98c7e09b0 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -62,7 +62,8 @@ extern "C" #include "BKE_global.h" #include "BKE_icons.h" #include "BKE_node.h" -#include "BKE_report.h" +#include "BKE_report.h" +#include "BKE_library.h" #include "BLI_blenlib.h" #include "DNA_scene_types.h" #include "DNA_userdef_types.h" @@ -404,6 +405,9 @@ int main(int argc, char** argv) initglobals(); + // We load our own G.main, so free the one that initglobals() gives us + free_main(G.main); + IMB_init(); // Setup builtin font for BLF (mostly copied from creator.c, wm_init_exit.c and interface_style.c) |