[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36992] trunk/blender/source/gameengine/ GamePlayer/ghost/GPG_ghost.cpp: Fixing the initglobals leak in the Blenderplayer (G. main reference was being reassigned before it was freed).
Mitchell Stokes
mogurijin at gmail.com
Sun May 29 06:15:36 CEST 2011
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)
More information about the Bf-blender-cvs
mailing list