From 685316b406b5139b61d16e7df071918b179cda2f Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Thu, 1 May 2014 18:34:10 -0700 Subject: BGE: Forgot a NULL check in CcdPhysicsEnvironment::MergeEnvironment() --- source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/gameengine') diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp index 3c9c5d0a239..bbc3968347c 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp @@ -1901,8 +1901,10 @@ btDispatcher* CcdPhysicsEnvironment::GetDispatcher() void CcdPhysicsEnvironment::MergeEnvironment(PHY_IPhysicsEnvironment *other_env) { CcdPhysicsEnvironment *other = dynamic_cast(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::iterator it; -- cgit v1.2.3