]> git.mxchange.org Git - simgear.git/blobdiff - simgear/structure/event_mgr.cxx
restore some part of the code to prevent an untwanted segmentationf fault.
[simgear.git] / simgear / structure / event_mgr.cxx
index c66f00ce2c594ecbc106ee08674752ad3d929078..d4b573d00e84ea674529f5b22c32dac8401f8d37 100644 (file)
@@ -1,5 +1,7 @@
 #include "event_mgr.hxx"
 
+#include <simgear/math/SGMath.hxx>
+
 void SGEventMgr::add(SGCallback* cb,
                      double interval, double delay,
                      bool repeat, bool simtime)
@@ -35,9 +37,10 @@ void SGTimer::run()
 
 void SGEventMgr::update(double delta_time_sec)
 {
-    _rtQueue.update(delta_time_sec);
-    if(!_freezeProp || _freezeProp->getBoolValue() == false)
-        _simQueue.update(delta_time_sec);
+    _simQueue.update(delta_time_sec);
+    
+    double rt = _rtProp ? _rtProp->getDoubleValue() : 0;
+    _rtQueue.update(rt);
 }
 
 ////////////////////////////////////////////////////////////////////////