From fd35beaf0a51a45dc0df3e748edd196b56918283 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 13 Nov 2009 13:21:59 +0000 Subject: [PATCH] Check that mpctx->audio_out is not NULL when trying to uninit it. Make audio uninit consistent with e.g. the demuxer uninit code and also avoids a possible crash. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29908 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mplayer.c b/mplayer.c index ee58b03660..91de264af0 100644 --- a/mplayer.c +++ b/mplayer.c @@ -649,7 +649,8 @@ void uninit_player(unsigned int mask){ initialized_flags&=~INITIALIZED_AO; current_module="uninit_ao"; if (mpctx->edl_muted) mixer_mute(&mpctx->mixer); - mpctx->audio_out->uninit(mpctx->eof?0:1); mpctx->audio_out=NULL; + if (mpctx->audio_out) mpctx->audio_out->uninit(mpctx->eof?0:1); + mpctx->audio_out=NULL; } #ifdef CONFIG_GUI