From 7845f33c74cea6f35deac3017511e898e75dbc6d Mon Sep 17 00:00:00 2001 From: mfranz Date: Mon, 20 Mar 2006 11:01:16 +0000 Subject: [PATCH] a bool isn't safe enough here, but a mutex shouldn't be necessary --- src/Scripting/NasalSys.cxx | 6 +++--- src/Scripting/NasalSys.hxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx index 17187e9b3..c0b25c4ea 100644 --- a/src/Scripting/NasalSys.cxx +++ b/src/Scripting/NasalSys.cxx @@ -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--; } diff --git a/src/Scripting/NasalSys.hxx b/src/Scripting/NasalSys.hxx index 0b10ad0c7..7da34d66f 100644 --- a/src/Scripting/NasalSys.hxx +++ b/src/Scripting/NasalSys.hxx @@ -137,7 +137,7 @@ private: naRef _handler; int _gcKey; FGNasalSys* _nas; - bool _active; + unsigned int _active; }; -- 2.39.5