From 5b3c5407a1848b4c60b8a556f896cefe323830f5 Mon Sep 17 00:00:00 2001 From: ehofman Date: Fri, 3 Mar 2006 15:11:35 +0000 Subject: [PATCH] =?utf8?q?Mathias=20Fr=F6hlich:?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit I have some bugfixes which will avoid fg just crashing if the sound device could not be opened. --- simgear/sound/xmlsound.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.39.5