1
0
Fork 0

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:
James Turner 2013-08-29 22:12:00 +01:00
parent 0eef683af5
commit 0c8d84aad1

View file

@ -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 {