mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Increased stability Torqu3D: unit-tests running without a crash. See the console.log after ran unitTest_runTests( "", true ). @signmotion
This commit is contained in:
parent
29d7fe310d
commit
18ba0646c0
18 changed files with 113 additions and 19 deletions
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue