From: ehofman Date: Fri, 3 Mar 2006 15:13:42 +0000 (+0000) Subject: Mathias Fröhlich: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=813c518e07354d946d2b2e4f4d4e360da95e4955;p=flightgear.git Mathias Fröhlich: I have some bugfixes which will avoid fg just crashing if the sound device could not be opened. --- diff --git a/src/ATC/ATCVoice.cxx b/src/ATC/ATCVoice.cxx index 62524609f..682cd24a4 100644 --- a/src/ATC/ATCVoice.cxx +++ b/src/ATC/ATCVoice.cxx @@ -34,10 +34,13 @@ #include FGATCVoice::FGATCVoice() { + SoundData = 0; + rawSoundData = 0; } FGATCVoice::~FGATCVoice() { - free( rawSoundData ); + if (rawSoundData) + free( rawSoundData ); delete SoundData; }