forked from bartvdbraak/blender
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.
This commit is contained in:
parent
ea61c74262
commit
b2f837896d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user