From 813c518e07354d946d2b2e4f4d4e360da95e4955 Mon Sep 17 00:00:00 2001 From: ehofman Date: Fri, 3 Mar 2006 15:13:42 +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. --- src/ATC/ATCVoice.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.39.5