Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp6
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;
}