Fix crash on re-position with FGCom.
Don't assume valueChanged firing means the value has actually changed; various operations (eg, copyProperties) can also cause the signals to fire.
This commit is contained in:
parent
0eef683af5
commit
0c8d84aad1
1 changed files with 6 additions and 1 deletions
|
@ -402,7 +402,12 @@ void FGCom::shutdown()
|
|||
void FGCom::valueChanged(SGPropertyNode *prop)
|
||||
{
|
||||
if (prop == _enabled_node) {
|
||||
if( prop->getBoolValue() ) {
|
||||
bool isEnabled = prop->getBoolValue();
|
||||
if (_enabled == isEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if( isEnabled ) {
|
||||
init();
|
||||
postinit();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue