]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/soundmgr_openal.cxx
Win32 fix
[simgear.git] / 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 ) {