Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2013-11-06 23:40:37 +0400
committerMitchell Stokes <mogurijin@gmail.com>2013-11-06 23:40:37 +0400
commit5cd28bbe8071e4e83fe0baafe8e04360f65c1778 (patch)
tree9447c01855fad09cea5272f31fb44bfcdfd84df5 /source/gameengine
parent61c411068b4b6c593a3bb05b073b26e0d0227995 (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')
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp2
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;
}