]> git.mxchange.org Git - flightgear.git/commitdiff
a bool isn't safe enough here, but a mutex shouldn't be necessary
authormfranz <mfranz>
Mon, 20 Mar 2006 11:01:16 +0000 (11:01 +0000)
committermfranz <mfranz>
Mon, 20 Mar 2006 11:01:16 +0000 (11:01 +0000)
src/Scripting/NasalSys.cxx
src/Scripting/NasalSys.hxx

index 17187e9b39b755ccdab13d894558f13ef450c0b4..c0b25c4eaf47377baa79a1279da23315840800ef 100644 (file)
@@ -682,7 +682,7 @@ FGNasalListener::FGNasalListener(SGPropertyNode_ptr node, naRef handler,
     _handler(handler),
     _gcKey(key),
     _nas(nasal),
-    _active(false)
+    _active(0)
 {
 }
 
@@ -698,7 +698,7 @@ void FGNasalListener::valueChanged(SGPropertyNode* node)
                 "on property " << node->getPath());
         return;
     }
-    _active = true;
+    _active++;
     _nas->_cmdArg = node;
     naContext c = naNewContext();
     naModUnlock();
@@ -707,7 +707,7 @@ void FGNasalListener::valueChanged(SGPropertyNode* node)
     if(naGetError(c))
         _nas->logError(c);
     naFreeContext(c);
-    _active = false;
+    _active--;
 }
 
 
index 0b10ad0c7f20e191dd5bdeb90587ee0a33c3d5a0..7da34d66fe2663c637f5e7ec59c4bcc5f26ec43d 100644 (file)
@@ -137,7 +137,7 @@ private:
     naRef _handler;
     int _gcKey;
     FGNasalSys* _nas;
-    bool _active;
+    unsigned int _active;
 };