diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2012-11-05 19:13:54 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2012-11-05 19:13:54 +0400 |
commit | b2f837896d56df26c3d2b8bfd5596010c0f26ccf (patch) | |
tree | 9d7fb6af7b05c219f0dcb74468498be6457ccf4a | |
parent | ea61c7426287c28ae6b0cbb04419d6e2f7aaa663 (diff) |
Fix for [#33090] "Segfault/Crash with Empty and Motion Actuator, Keyboard Sensor" reported by Martin Felke (scorpion81).
Apparently, not all objects have physics controllers, so now we do a NULL check in KX_ObjectActuator.
-rw-r--r-- | source/gameengine/Ketsji/KX_ObjectActuator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.cpp b/source/gameengine/Ketsji/KX_ObjectActuator.cpp index 2999550fb8f..e5f7ea22b36 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_ObjectActuator.cpp @@ -117,7 +117,7 @@ bool KX_ObjectActuator::Update() } // Explicitly stop the movement if we're using a character (apply movement is a little different for characters) - if (parent->GetPhysicsController()->IsCharacter()) { + if (parent->GetPhysicsController() && parent->GetPhysicsController()->IsCharacter()) { MT_Vector3 vec(0.0, 0.0, 0.0); parent->ApplyMovement(vec, true); } |