fix for own bug added since 2.49a,
[blender.git] / source / gameengine / Converter / KX_BlenderSceneConverter.cpp
index 59c073c2b1f38f1749461b5c2652ea9472d89a97..4f47ce7a0368a93400a61e8c5a71cbbef3a220ad 100644 (file)
@@ -492,10 +492,11 @@ void KX_BlenderSceneConverter::RegisterGameObject(
        m_map_blender_to_gameobject.insert(CHashedPtr(for_blenderobject),gameobject);
 }
 
+/* only need to run this during conversion since
+ * m_map_blender_to_gameobject is freed after conversion */
 void KX_BlenderSceneConverter::UnregisterGameObject(
                                                                        KX_GameObject *gameobject) 
 {
-#if 0
        struct Object *bobp= gameobject->GetBlenderObject();
        if (bobp) {
                CHashedPtr bptr(bobp);
@@ -507,7 +508,6 @@ void KX_BlenderSceneConverter::UnregisterGameObject(
                        m_map_blender_to_gameobject.remove(bptr);
                }
        }
-#endif
 }
 
 KX_GameObject *KX_BlenderSceneConverter::FindGameObject(