]> git.mxchange.org Git - flightgear.git/commitdiff
Fix duplicated FGIO channels on reset.
authorJames Turner <zakalawe@mac.com>
Wed, 26 Mar 2014 19:23:34 +0000 (19:23 +0000)
committerJames Turner <zakalawe@mac.com>
Wed, 26 Mar 2014 19:24:00 +0000 (19:24 +0000)
Thanks to Nicholas Scheel for spotting this.

src/Main/fg_init.cxx

index 06404440bbca61925a24aa0797feb5492f3ddb9b..4b7e5b6fd0ab2ef8a3adc8a97159c7223febf9a5 100644 (file)
@@ -1007,6 +1007,9 @@ void fgStartNewReset()
     simgear::GlobalParticleCallback::setSwitch(NULL);
     
     globals->resetPropertyRoot();
+    // otherwise channels are duplicated
+    globals->get_channel_options_list()->clear();
+  
     fgInitConfig(0, NULL, true);
     fgInitGeneral(); // all of this?