fix segfault when resuming from pause

git-svn-id: https://svn.musicpd.org/mpd/trunk@2293 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes 2004-10-22 15:19:35 +00:00
parent 8502eeee6e
commit d171fe9a2f

View File

@ -150,6 +150,7 @@ int isCurrentAudioFormat(AudioFormat * audioFormat) {
int openAudioDevice(AudioFormat * audioFormat) {
if(!aoOutput->open || !isCurrentAudioFormat(audioFormat)) {
if(!audioFormat) return -1;
copyAudioFormat(&audio_format, audioFormat);
if(shoutOutput) openAudioOutput(shoutOutput, audioFormat);
return openAudioOutput(aoOutput, audioFormat);