From 04be9ca6704933572cc9976c2ce7b50802afe67c Mon Sep 17 00:00:00 2001 From: frohlich Date: Tue, 25 Apr 2006 18:47:37 +0000 Subject: [PATCH] Pigeons remaining fix for the soundmanager crashes. --- simgear/sound/soundmgr_openal.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/simgear/sound/soundmgr_openal.cxx b/simgear/sound/soundmgr_openal.cxx index 9d47c19a..2d7c53a9 100644 --- a/simgear/sound/soundmgr_openal.cxx +++ b/simgear/sound/soundmgr_openal.cxx @@ -91,8 +91,13 @@ SGSoundMgr::SGSoundMgr() { SG_LOG( SG_GENERAL, SG_ALERT, "Audio initialization failed!" ); SG_LOG( SG_GENERAL, SG_ALERT, " "+string(alutGetErrorString(error))); working = false; + context = 0; + } + else + { + working = true; + context = alcGetCurrentContext(); } - context = alcGetCurrentContext(); #else if ( (dev = alcOpenDevice( NULL )) != NULL && ( context = alcCreateContext( dev, NULL )) != NULL ) { -- 2.39.5