Revision: 36992
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36992
Author:   moguri
Date:     2011-05-29 04:15:35 +0000 (Sun, 29 May 2011)
Log Message:
-----------
Fixing the initglobals leak in the Blenderplayer (G.main reference was being 
reassigned before it was freed).

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

Modified: trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp      
2011-05-29 02:40:37 UTC (rev 36991)
+++ trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp      
2011-05-29 04:15:35 UTC (rev 36992)
@@ -62,7 +62,8 @@
 #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 @@
        
        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)

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

Reply via email to