diff --git a/simgear/sound/xmlsound.cxx b/simgear/sound/xmlsound.cxx index 0c8c3fd9..218c3f68 100644 --- a/simgear/sound/xmlsound.cxx +++ b/simgear/sound/xmlsound.cxx @@ -78,7 +78,8 @@ SGXmlSound::SGXmlSound() SGXmlSound::~SGXmlSound() { - _sample->stop(); + if (_sample) + _sample->stop(); delete _condition;