diff --git a/simgear/sound/xmlsound.cxx b/simgear/sound/xmlsound.cxx index 7bb25c89..148c6b39 100644 --- a/simgear/sound/xmlsound.cxx +++ b/simgear/sound/xmlsound.cxx @@ -83,6 +83,9 @@ SGXmlSound::~SGXmlSound() if (_sample) _sample->stop(); + if (_sgrp && (_name != "")) + _sgrp->remove(_name); + _volume.clear(); _pitch.clear(); }