[Bf-blender-cvs] [5e5d3d6] master: BGE: Call DNA_sdna_current_init when launching blenderplayer.

Porteries Tristan noreply at git.blender.org
Mon Aug 8 15:40:47 CEST 2016


Commit: 5e5d3d6391448d30c1946452aeaf3086f28ad875
Author: Porteries Tristan
Date:   Mon Aug 8 15:39:34 2016 +0000
Branches: master
https://developer.blender.org/rB5e5d3d6391448d30c1946452aeaf3086f28ad875

BGE: Call DNA_sdna_current_init when launching blenderplayer.

Don't calling DNA_sdna_current_init was creating a crash because a global uninitialized
variable was used when reading blender files.

===================================================================

M	source/gameengine/GamePlayer/ghost/GPG_ghost.cpp

===================================================================

diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index d033afa..edbbf93 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -61,6 +61,7 @@ extern "C"
 
 #include "DNA_scene_types.h"
 #include "DNA_userdef_types.h"
+#include "DNA_genfile.h"
 
 #include "BLO_readfile.h"
 #include "BLO_runtime.h"
@@ -492,6 +493,8 @@ int main(
 	// freeing up GPU_Textures works correctly.
 	BLI_threadapi_init();
 
+	DNA_sdna_current_init();
+
 	RNA_init();
 
 	init_nodesystem();




More information about the Bf-blender-cvs mailing list