diff options
author | Nick Samarin <nicks1987@bigmir.net> | 2010-08-05 15:08:52 +0400 |
---|---|---|
committer | Nick Samarin <nicks1987@bigmir.net> | 2010-08-05 15:08:52 +0400 |
commit | ff87e3c5e821e028e9b6677765877cfb97139445 (patch) | |
tree | 7e867c1205f73bb353a96fc8f4f24eef41d0ae24 /source/gameengine/Ketsji/KX_Scene.cpp | |
parent | 5f78619a652ed23ce1c397b19da45ddb1b5434e4 (diff) |
fixed bug: destroy obstacle simulation after removing of all objects
Diffstat (limited to 'source/gameengine/Ketsji/KX_Scene.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 5c002de6358..05387ed5bfc 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -233,9 +233,6 @@ KX_Scene::KX_Scene(class SCA_IInputDevice* keyboarddevice, KX_Scene::~KX_Scene() { - if (m_obstacleSimulation) - delete m_obstacleSimulation; - // The release of debug properties used to be in SCA_IScene::~SCA_IScene // It's still there but we remove all properties here otherwise some // reference might be hanging and causing late release of objects @@ -247,6 +244,9 @@ KX_Scene::~KX_Scene() this->RemoveObject(parentobj); } + if (m_obstacleSimulation) + delete m_obstacleSimulation; + if(m_objectlist) m_objectlist->Release(); |