fixed bug: destroy obstacle simulation after removing of all objects

This commit is contained in:
Nick Samarin 2010-08-05 11:08:52 +00:00
parent 5f78619a65
commit ff87e3c5e8

@ -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();