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:
authorCampbell Barton <ideasman42@gmail.com>2009-05-23 08:56:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-05-23 08:56:37 +0400
commit3820e4f3db2ca23f7eeed7c3121cc41b0e12db25 (patch)
tree122cde0bbc33c5a6f8dcea0d2829d82d7d8722f6 /source/gameengine/GameLogic
parentcfa2b4f0a5530e0cdda09d466fff267ad9e7eccc (diff)
BGE PyController module reloading didnt check that the base of the function was a module (could be a class).
Diffstat (limited to 'source/gameengine/GameLogic')
-rw-r--r--source/gameengine/GameLogic/SCA_PythonController.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp
index 8140dbd53db..52f6bece132 100644
--- a/source/gameengine/GameLogic/SCA_PythonController.cpp
+++ b/source/gameengine/GameLogic/SCA_PythonController.cpp
@@ -336,7 +336,7 @@ bool SCA_PythonController::Import()
PyObject *base= mod;
for(unsigned int i=1; i < py_function_path.size(); i++) {
- if(m_debug) {
+ if(m_debug && PyModule_Check(base)) { /* base could be a class */
Py_DECREF(base); /* getting a new one so dont hold a ref to the old one */
base= PyImport_ReloadModule(base);
if (base==NULL) {