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>2014-05-02 05:34:10 +0400
committerMitchell Stokes <mogurijin@gmail.com>2014-05-02 05:34:25 +0400
commit685316b406b5139b61d16e7df071918b179cda2f (patch)
treea56d15ad00387c68ab8c9f666a596f7788cae230 /source/gameengine
parent867efab40430693333c04009ef1e6d5b94746a66 (diff)
BGE: Forgot a NULL check in CcdPhysicsEnvironment::MergeEnvironment()
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp6
1 files changed, 4 insertions, 2 deletions
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<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;