[Bf-blender-cvs] [685316b] master: BGE: Forgot a NULL check in CcdPhysicsEnvironment::MergeEnvironment()
Mitchell Stokes
noreply at git.blender.org
Fri May 2 03:35:21 CEST 2014
Commit: 685316b406b5139b61d16e7df071918b179cda2f
Author: Mitchell Stokes
Date: Thu May 1 18:34:10 2014 -0700
https://developer.blender.org/rB685316b406b5139b61d16e7df071918b179cda2f
BGE: Forgot a NULL check in CcdPhysicsEnvironment::MergeEnvironment()
===================================================================
M source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
===================================================================
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
index 3c9c5d0..bbc3968 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<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;
More information about the Bf-blender-cvs
mailing list