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

src/ATC/ATCVoice.cxx

index 62524609fcb2f733ae5027963541fca501b3033d..682cd24a4ed72b4f70e321f26c05a8ef191686df 100644 (file)
 #include <stdlib.h>
 
 FGATCVoice::FGATCVoice() {
+  SoundData = 0;
+  rawSoundData = 0;
 }
 
 FGATCVoice::~FGATCVoice() {
-    free( rawSoundData );
+    if (rawSoundData)
+        free( rawSoundData );
     delete SoundData;
 }