diff --git a/simgear/props/props.cxx b/simgear/props/props.cxx index 90efffed..a04f90ca 100644 --- a/simgear/props/props.cxx +++ b/simgear/props/props.cxx @@ -758,8 +758,9 @@ SGPropertyNode::~SGPropertyNode () clearValue(); if (_listeners) { - for (unsigned i = 0; i < _listeners.size(); ++i) - _listeners[i]->unregister_property(this); + vector::iterator it; + for (it = _listeners->begin(); it != _listeners->end(); ++it) + (*it)->unregister_property(this); delete _listeners; } }