Revision: 20352
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20352
Author:   campbellbarton
Date:     2009-05-23 06:56:37 +0200 (Sat, 23 May 2009)

Log Message:
-----------
BGE PyController module reloading didnt check that the base of the function was 
a module (could be a class).

Modified Paths:
--------------
    trunk/blender/source/gameengine/GameLogic/SCA_PythonController.cpp
    trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp

Modified: trunk/blender/source/gameengine/GameLogic/SCA_PythonController.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_PythonController.cpp  
2009-05-23 03:40:38 UTC (rev 20351)
+++ trunk/blender/source/gameengine/GameLogic/SCA_PythonController.cpp  
2009-05-23 04:56:37 UTC (rev 20352)
@@ -336,7 +336,7 @@
        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) {

Modified: trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp 2009-05-23 03:40:38 UTC 
(rev 20351)
+++ trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp 2009-05-23 04:56:37 UTC 
(rev 20352)
@@ -1452,7 +1452,7 @@
 {
        m_logicmgr->EndFrame();
        int numobj = m_euthanasyobjects->GetCount();
-       int i;
+
        KX_GameObject* obj;
 
        while ((numobj = m_euthanasyobjects->GetCount()) > 0)


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

Reply via email to