]> git.mxchange.org Git - simgear.git/commitdiff
unbind in reverse order to try to prevent order dependency problems.
authorehofman <ehofman>
Tue, 29 Dec 2009 14:28:21 +0000 (14:28 +0000)
committerTim Moore <timoore33@gmail.com>
Tue, 29 Dec 2009 23:20:08 +0000 (00:20 +0100)
simgear/structure/subsystem_mgr.cxx

index 0ed6b43623913bb6d72dd3193805526f82123f4e..1c60f47b068729e8d38d3c8f823dd5cacf3e3541 100644 (file)
@@ -148,8 +148,9 @@ SGSubsystemGroup::bind ()
 void
 SGSubsystemGroup::unbind ()
 {
-    for (unsigned int i = 0; i < _members.size(); i++)
-        _members[i]->subsystem->unbind();
+    // reverse order to prevent order dependency problems
+    for (unsigned int i = _members.size(); i > 0; i--)
+       _members[i-1]->subsystem->unbind();
 }
 
 void