diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 8feae48f12e..52fb13bd41c 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -838,8 +838,10 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene, if (mface->v4) tan3 = tangent[f*4 + 3]; } - - ma = give_current_material(blenderobj, mface->mat_nr+1); + if(blenderobj) + ma = give_current_material(blenderobj, mface->mat_nr+1); + else + ma = mesh->mat ? mesh->mat[mface->mat_nr]:NULL; { bool visible = true; diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index a02fd9cec1b..c72958bbc46 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -142,6 +142,8 @@ KX_GameObject::~KX_GameObject() (*contit)->ClearObject(); } m_pSGNode->SetSGClientObject(NULL); + + /* m_pSGNode is freed in KX_Scene::RemoveNodeDestructObject */ } if (m_pGraphicController) { diff --git a/source/gameengine/Ketsji/KX_RayEventManager.h b/source/gameengine/Ketsji/KX_RayEventManager.h index 030dae525e1..589a3f37d50 100644 --- a/source/gameengine/Ketsji/KX_RayEventManager.h +++ b/source/gameengine/Ketsji/KX_RayEventManager.h @@ -37,8 +37,6 @@ using namespace std; class KX_RayEventManager : public SCA_EventManager { - - class SCA_LogicManager* m_logicmgr; public: KX_RayEventManager(class SCA_LogicManager* logicmgr) : SCA_EventManager(logicmgr, RAY_EVENTMGR) diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp index df8dc3560ac..b7d0dd2f6e7 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp @@ -593,7 +593,7 @@ bool CcdPhysicsController::ReplaceControllerShape(btCollisionShape *newShape) for(int i= 0; i < obarr.size(); i++) { ob= obarr[i]; if (ob->getCollisionShape() == newShape); { - proxy = obarr[i]->getBroadphaseHandle(); + proxy = ob->getBroadphaseHandle(); if(proxy) dw->getPairCache()->cleanProxyFromPairs(proxy,dw->getDispatcher());