BGE: Forgot a NULL check in CcdPhysicsEnvironment::MergeEnvironment()

This commit is contained in:
Mitchell Stokes 2014-05-01 18:34:10 -07:00
parent 867efab404
commit 685316b406

@ -1901,8 +1901,10 @@ btDispatcher* CcdPhysicsEnvironment::GetDispatcher()
void CcdPhysicsEnvironment::MergeEnvironment(PHY_IPhysicsEnvironment *other_env)
{
CcdPhysicsEnvironment *other = dynamic_cast<CcdPhysicsEnvironment*>(other_env);
printf("KX_Scene::MergeScene: Other scene is not using Bullet physics, not merging physics.\n");
return;
if (other == NULL) {
printf("KX_Scene::MergeScene: Other scene is not using Bullet physics, not merging physics.\n");
return;
}
std::set<CcdPhysicsController*>::iterator it;