[Bf-blender-cvs] [f3c7cb0] master: Fix T37964: KX_GameObject missing NULL checks for m_physicsController.
Mitchell Stokes
noreply at git.blender.org
Fri Feb 14 22:18:38 CET 2014
Commit: f3c7cb02b2a5e7b7ee780b598a73b08bf39dae76
Author: Mitchell Stokes
Date: Fri Feb 14 13:13:32 2014 -0800
https://developer.blender.org/rBf3c7cb02b2a5e7b7ee780b598a73b08bf39dae76
Fix T37964: KX_GameObject missing NULL checks for m_physicsController.
KX_GameObject::PySuspendDynamics() and KX_GameObjectPyRestoreDynamics()
now make sure GetPhysicsController() is non NULL before attempting
to use it.
===================================================================
M source/gameengine/Ketsji/KX_GameObject.cpp
===================================================================
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index b6844a6..f1f12ca 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;
}
More information about the Bf-blender-cvs
mailing list