From 85630c836a47b2b907bd5035b1c8df5801728ec9 Mon Sep 17 00:00:00 2001 From: vspader Date: Sat, 28 Feb 2009 11:01:49 -0800 Subject: [PATCH] Fixed bug when you changed the playlist without having a next song queued up. --- Audio/AudioPlayer.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Audio/AudioPlayer.m b/Audio/AudioPlayer.m index 0a5e246a7..d5c9f2a69 100644 --- a/Audio/AudioPlayer.m +++ b/Audio/AudioPlayer.m @@ -168,10 +168,13 @@ - (void)resetNextStreams { @synchronized (chainQueue) { + NSUInteger count = [chainQueue count]; [chainQueue removeAllObjects]; - } - [self endOfInputReached:bufferChain]; + if (count) { + [self endOfInputReached:bufferChain]; + } + } }