summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--playlist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/playlist.c b/playlist.c
index cbcc1e03..d998ca8a 100644
--- a/playlist.c
+++ b/playlist.c
@@ -3819,6 +3819,10 @@ void
plt_init_shuffle_albums (playlist_t *plt, int r) {
pl_lock ();
playItem_t *first = plt_get_item_for_idx (plt, r, PL_MAIN);
+ if (!first) {
+ pl_unlock ();
+ return;
+ }
if (first->played) {
plt_reshuffle (plt, NULL, NULL);
}