From 3aaf888bfd21412425d9dbf900a72f0e6ca26b89 Mon Sep 17 00:00:00 2001 From: waker Date: Mon, 1 Oct 2012 22:45:14 +0200 Subject: fixed bug in the shuffle albums mode, which would crash the player if a current track was paused, then deleted --- playlist.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'playlist.c') 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); } -- cgit v1.2.3