]> git.mxchange.org Git - simgear.git/commitdiff
Mathias Fröhlich:
authorehofman <ehofman>
Fri, 3 Mar 2006 15:11:35 +0000 (15:11 +0000)
committerehofman <ehofman>
Fri, 3 Mar 2006 15:11:35 +0000 (15:11 +0000)
I have some bugfixes which will avoid fg just crashing if the sound device
could not be opened.

simgear/sound/xmlsound.cxx

index 0c8c3fd92ebf37ba64402701115ba1d90283c4f2..218c3f681b06b0e4c0f22d9d7ebb0501fb58737b 100644 (file)
@@ -78,7 +78,8 @@ SGXmlSound::SGXmlSound()
 
 SGXmlSound::~SGXmlSound()
 {
-    _sample->stop();
+    if (_sample)
+        _sample->stop();
 
     delete _condition;