From c2977fd61d8b6fdb308dfba93211025724e73bf2 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Wed, 5 May 2010 19:19:16 +0200 Subject: [PATCH] Protect playback_start() againt empty playlist --- src/player.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/player.c b/src/player.c index 9f1ca269..ce3390ec 100644 --- a/src/player.c +++ b/src/player.c @@ -1652,6 +1652,13 @@ playback_start(void *arg) uint32_t *idx_id; int ret; + if (!source_head) + { + DPRINTF(E_LOG, L_PLAYER, "Nothing to play!\n"); + + return -1; + } + idx_id = (uint32_t *)arg; if (player_state == PLAY_PLAYING)