]> git.mxchange.org Git - simgear.git/commitdiff
Pigeons remaining fix for the soundmanager crashes.
authorfrohlich <frohlich>
Tue, 25 Apr 2006 18:47:37 +0000 (18:47 +0000)
committerfrohlich <frohlich>
Tue, 25 Apr 2006 18:47:37 +0000 (18:47 +0000)
simgear/sound/soundmgr_openal.cxx

index 9d47c19affb8bf3bdcd97820bc9368e555c14460..2d7c53a92d839558ed32d6d5136180afbf3117b9 100644 (file)
@@ -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 ) {