]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/soundmgr_openal.cxx
restore some part of the code to prevent an untwanted segmentationf fault.
[simgear.git] / simgear / sound / soundmgr_openal.cxx
index 22c486daa3e1aec0c38b4594bcecc205d69dbc48..4ff36eee99597b16640a4432b01278188f1ec7a1 100644 (file)
@@ -179,6 +179,8 @@ void SGSoundMgr::stop() {
             _buffers.erase( buffers_current );
         }
 
+        _context = alcGetCurrentContext();
+        _device = alcGetContextsDevice(_context);
         alcDestroyContext(_context);
         alcCloseDevice(_device);
     }