Fix T45269: Blender 2.75 crashes when I run my the game

Velocity clamping on static objects caused a crash.
This commit is contained in:
Sybren A. Stüvel 2015-07-02 12:05:38 +02:00
parent e80e4c937b
commit db8ccc18f7

@ -700,7 +700,7 @@ CcdPhysicsController::~CcdPhysicsController()
void CcdPhysicsController::SimulationTick(float timestep) void CcdPhysicsController::SimulationTick(float timestep)
{ {
btRigidBody *body = GetRigidBody(); btRigidBody *body = GetRigidBody();
if (!body && body->isStaticObject()) if (!body || body->isStaticObject())
return; return;
// Clamp linear velocity // Clamp linear velocity