From: frohlich Date: Tue, 25 Apr 2006 18:47:37 +0000 (+0000) Subject: Pigeons remaining fix for the soundmanager crashes. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=04be9ca6704933572cc9976c2ce7b50802afe67c;p=simgear.git Pigeons remaining fix for the soundmanager crashes. --- 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 ) {