a bool isn't safe enough here, but a mutex shouldn't be necessary
This commit is contained in:
parent
4c5e96f730
commit
7845f33c74
2 changed files with 4 additions and 4 deletions
|
@ -682,7 +682,7 @@ FGNasalListener::FGNasalListener(SGPropertyNode_ptr node, naRef handler,
|
||||||
_handler(handler),
|
_handler(handler),
|
||||||
_gcKey(key),
|
_gcKey(key),
|
||||||
_nas(nasal),
|
_nas(nasal),
|
||||||
_active(false)
|
_active(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -698,7 +698,7 @@ void FGNasalListener::valueChanged(SGPropertyNode* node)
|
||||||
"on property " << node->getPath());
|
"on property " << node->getPath());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_active = true;
|
_active++;
|
||||||
_nas->_cmdArg = node;
|
_nas->_cmdArg = node;
|
||||||
naContext c = naNewContext();
|
naContext c = naNewContext();
|
||||||
naModUnlock();
|
naModUnlock();
|
||||||
|
@ -707,7 +707,7 @@ void FGNasalListener::valueChanged(SGPropertyNode* node)
|
||||||
if(naGetError(c))
|
if(naGetError(c))
|
||||||
_nas->logError(c);
|
_nas->logError(c);
|
||||||
naFreeContext(c);
|
naFreeContext(c);
|
||||||
_active = false;
|
_active--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ private:
|
||||||
naRef _handler;
|
naRef _handler;
|
||||||
int _gcKey;
|
int _gcKey;
|
||||||
FGNasalSys* _nas;
|
FGNasalSys* _nas;
|
||||||
bool _active;
|
unsigned int _active;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue