Increased stability Torqu3D: unit-tests running without a crash. See the console.log after ran unitTest_runTests( "", true ). @signmotion

This commit is contained in:
LuisAntonRebollo 2014-05-25 16:50:19 +02:00
parent 29d7fe310d
commit 18ba0646c0
18 changed files with 113 additions and 19 deletions

View file

@ -605,6 +605,7 @@ bool SceneManager::addObjectToScene( SceneObject* object )
void SceneManager::removeObjectFromScene( SceneObject* obj )
{
AssertFatal( obj, "SceneManager::removeObjectFromScene - Object is not declared" );
AssertFatal( obj->getSceneManager() == this, "SceneManager::removeObjectFromScene - Object not part of SceneManager" );
// Notify the object.
@ -613,7 +614,8 @@ void SceneManager::removeObjectFromScene( SceneObject* obj )
// Remove the object from the container.
getContainer()->removeObject( obj );
if( getContainer() )
getContainer()->removeObject( obj );
// Remove the object from the zoning system.