]> git.mxchange.org Git - simgear.git/commitdiff
Don't crash on exit
authorFrederic Bouvier <fredfgfs01@free.fr>
Sun, 7 Nov 2010 09:31:13 +0000 (10:31 +0100)
committerFrederic Bouvier <fredfgfs01@free.fr>
Sun, 7 Nov 2010 09:31:13 +0000 (10:31 +0100)
simgear/props/props.cxx

index 3d63758e143707fe38b100728e8ac6f7534f2e99..193f02d3d8d354ac0021f40b2606f544c3821edb 100644 (file)
@@ -2068,6 +2068,8 @@ SGPropertyNode::addChangeListener (SGPropertyChangeListener * listener,
 void
 SGPropertyNode::removeChangeListener (SGPropertyChangeListener * listener)
 {
+  if (_listeners == 0)
+    return;
   vector<SGPropertyChangeListener*>::iterator it =
     find(_listeners->begin(), _listeners->end(), listener);
   if (it != _listeners->end()) {