]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scripting/NasalSys.cxx
canvas::Text: expose more text/cursor methods to Nasal.
[flightgear.git] / src / Scripting / NasalSys.cxx
index f70aa3c619ca859f8f2d7850d0e29e46bec77823..75c49fbcf5d05d7b262b1de836e01ba9d21569d9 100644 (file)
@@ -146,11 +146,14 @@ public:
   
   void invoke()
   {
+    if( _singleShot )
+      // Callback may restart the timer, so update status before callback is
+      // called (Prevent warnings of deleting not existing tasks from the
+      // event manager).
+      _isRunning = false;
+
     naRef *args = NULL;
     _sys->callMethod(_func, _self, 0, args, naNil() /* locals */);
-    if (_singleShot) {
-      _isRunning = false;
-    }
   }
   
   void setSingleShot(bool aSingleShot)