only attempt lock/unlock audio operations when audio is initialized/handled

from Adam Procter via wcobb@
This commit is contained in:
pvalchev 2002-06-08 09:21:19 +00:00
parent 2490d11f93
commit ba79eaa958

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-audio_MPEGaudio_cpp,v 1.1 2002/06/08 09:21:19 pvalchev Exp $
--- audio/MPEGaudio.cpp.orig Wed Apr 4 15:42:40 2001
+++ audio/MPEGaudio.cpp Sat Jun 8 04:15:54 2002
@@ -200,9 +200,11 @@ void
MPEGaudio:: Stop(void)
{
if ( valid_stream ) {
- SDL_LockAudio();
+ if ( sdl_audio )
+ SDL_LockAudio();
playing = false;
- SDL_UnlockAudio();
+ if ( sdl_audio )
+ SDL_UnlockAudio();
}
ResetPause();
}