Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2006-05-14 03:31:36 +0400
committerErwin Coumans <blender@erwincoumans.com>2006-05-14 03:31:36 +0400
commit4a5826fa83f15dad702a65438b36ec6d1f0f30df (patch)
tree9a85a95403f3669c335316eb90734cf3c3698c29 /source/gameengine/Ketsji/KX_PythonInit.cpp
parentd790049639eb4b2517cfaf3d7a3e1fe2e2b21281 (diff)
Patch from Charlie:
Cleared the python dictionary at the end of the game engine, should fix some issues, also reverted the python controller changes, related to this This should fix the following bugs: [ #3789 ] [ #3815 ] possiblyy fixes: [ #3834 ]
Diffstat (limited to 'source/gameengine/Ketsji/KX_PythonInit.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index f86b984c789..65751a995d9 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -784,6 +784,15 @@ PyObject* initGameLogic(KX_Scene* scene) // quick hack to get gravity hook
return d;
}
+void dictionaryClearByHand(PyObject *dict)
+{
+ // Clears the dictionary by hand:
+ // This prevents, extra references to global variables
+ // inside the GameLogic dictionary when the python interpreter is finalized.
+ // which allows the scene to safely delete them :)
+ // see: (space.c)->start_game
+ if(dict) PyDict_Clear(dict);
+}
// Python Sandbox code