[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31064] branches/soc-2010-nicks/source/ gameengine/Ketsji/KX_Scene.cpp: fixed bug: destroy obstacle simulation after removing of all objects

Nick Samarin nicks1987 at bigmir.net
Thu Aug 5 13:08:52 CEST 2010


Revision: 31064
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31064
Author:   nicks
Date:     2010-08-05 13:08:52 +0200 (Thu, 05 Aug 2010)

Log Message:
-----------
fixed bug: destroy obstacle simulation after removing of all objects

Modified Paths:
--------------
    branches/soc-2010-nicks/source/gameengine/Ketsji/KX_Scene.cpp

Modified: branches/soc-2010-nicks/source/gameengine/Ketsji/KX_Scene.cpp
===================================================================
--- branches/soc-2010-nicks/source/gameengine/Ketsji/KX_Scene.cpp	2010-08-05 10:50:38 UTC (rev 31063)
+++ branches/soc-2010-nicks/source/gameengine/Ketsji/KX_Scene.cpp	2010-08-05 11:08:52 UTC (rev 31064)
@@ -233,9 +233,6 @@
 
 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 @@
 		this->RemoveObject(parentobj);
 	}
 
+	if (m_obstacleSimulation)
+		delete m_obstacleSimulation;
+
 	if(m_objectlist)
 		m_objectlist->Release();
 





More information about the Bf-blender-cvs mailing list