diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-11-06 23:40:37 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-11-06 23:40:37 +0400 |
commit | 5cd28bbe8071e4e83fe0baafe8e04360f65c1778 (patch) | |
tree | 9447c01855fad09cea5272f31fb44bfcdfd84df5 /source/gameengine/Physics | |
parent | 61c411068b4b6c593a3bb05b073b26e0d0227995 (diff) |
BGE: Fix for #37335 "Moving the camera with a key (after the recent BGE cleanup commits) now crashes the game" reported by Ace Dragon.
CcdPhysicsEnvironment->GetCharacterController(); was missing a NULL check.
Diffstat (limited to 'source/gameengine/Physics')
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp index 10be1876e41..71ed6af2f99 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp @@ -2288,7 +2288,7 @@ PHY_IVehicle* CcdPhysicsEnvironment::GetVehicleConstraint(int constraintId) PHY_ICharacter* CcdPhysicsEnvironment::GetCharacterController(KX_GameObject *ob) { CcdPhysicsController* controller = (CcdPhysicsController*)ob->GetPhysicsController(); - return dynamic_cast<BlenderBulletCharacterController*>(controller->GetCharacterController()); + return (controller) ? dynamic_cast<BlenderBulletCharacterController*>(controller->GetCharacterController()) : NULL; } |