From 682e495ed031cafe02006c8aec2e15877e483926 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Wed, 5 May 2010 19:17:36 +0200 Subject: [PATCH] Protect shuffle against empty player playlist --- src/player.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/player.c b/src/player.c index 55e68215..9f1ca269 100644 --- a/src/player.c +++ b/src/player.c @@ -486,6 +486,9 @@ source_shuffle(struct player_source *head) int nitems; int i; + if (!head) + return NULL; + ps = head; nitems = 0; do