aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-08-23 15:49:14 -0700
committerEric Wong <normalperson@yhbt.net>2008-08-23 15:49:14 -0700
commitd822bdec0700b94d83f2e15c2aa6602307179724 (patch)
treec7e3d5bf0ff0965c92eaeaaee2b7d7f94303e5e4
parent77703f7a41745943ef30d5e888108977bfad6e35 (diff)
downloadmpd-d822bdec0700b94d83f2e15c2aa6602307179724.tar.gz
mpd-d822bdec0700b94d83f2e15c2aa6602307179724.tar.xz
mpd-d822bdec0700b94d83f2e15c2aa6602307179724.zip
change queueNextSongInPlaylist assertion to check
There are still some places where we try to call this function without the playlist being stopped. It's really harmless, to call it and just break out immediately, so change the assertion.
-rw-r--r--src/playlist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 9839cc346..fa355bcaa 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -525,7 +525,8 @@ static int next_order_num(void)
static void queueNextSongInPlaylist(void)
{
- assert(playlist_state == PLAYLIST_STATE_PLAY);
+ if (playlist_state != PLAYLIST_STATE_PLAY)
+ return;
/* DEBUG("%s:%d\n", __func__, __LINE__); */
if (pthread_mutex_trylock(&queue_lock) == EBUSY)
return; /* still decoding */