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
Notes: blender-bot 2023-02-14 08:56:48 +01:00
Referenced by issue #45273, BGE Physics type Character Crash. 2.75
Referenced by issue #45269, Blender 2.75 crashes when I run my the game
1 changed files with 1 additions and 1 deletions

View File

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