diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-09 23:59:32 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-09 23:59:32 +0400 |
commit | 7370ba1839973010dd6e0ed0349c34477d8ece0a (patch) | |
tree | 31afe355c52ff2efb09842e5a117f82a8c7d5f66 /source/gameengine/Ketsji/KX_GameObject.cpp | |
parent | 65d1e27ff5b5d315a462c27d9e194561b78072ec (diff) |
fix for NULL pointer usages
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 47d83c16659..7ca8e7e3b52 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -327,7 +327,7 @@ void KX_GameObject::RemoveParent(KX_Scene *scene) rootobj->m_pPhysicsController1->RemoveCompoundChild(m_pPhysicsController1); } m_pPhysicsController1->RestoreDynamics(); - if (m_pPhysicsController1->IsDyna() && rootobj->m_pPhysicsController1) + if (m_pPhysicsController1->IsDyna() && (rootobj != NULL && rootobj->m_pPhysicsController1)) { // dynamic object should remember the velocity they had while being parented MT_Point3 childPoint = GetSGNode()->GetWorldPosition(); |