From: ehofman Date: Tue, 29 Dec 2009 14:28:21 +0000 (+0000) Subject: unbind in reverse order to try to prevent order dependency problems. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5e79609955613c3f34749e2615031a26da6b2f03;p=simgear.git unbind in reverse order to try to prevent order dependency problems. --- diff --git a/simgear/structure/subsystem_mgr.cxx b/simgear/structure/subsystem_mgr.cxx index 0ed6b436..1c60f47b 100644 --- a/simgear/structure/subsystem_mgr.cxx +++ b/simgear/structure/subsystem_mgr.cxx @@ -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