diff options
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index b6844a6900f..f1f12caed19 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -3032,7 +3032,8 @@ PyObject *KX_GameObject::PyApplyImpulse(PyObject *args) PyObject *KX_GameObject::PySuspendDynamics() { - GetPhysicsController()->SuspendDynamics(); + if (GetPhysicsController()) + GetPhysicsController()->SuspendDynamics(); Py_RETURN_NONE; } @@ -3040,7 +3041,8 @@ PyObject *KX_GameObject::PySuspendDynamics() PyObject *KX_GameObject::PyRestoreDynamics() { - GetPhysicsController()->RestoreDynamics(); + if (GetPhysicsController()) + GetPhysicsController()->RestoreDynamics(); Py_RETURN_NONE; } |