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