summaryrefslogtreecommitdiff
path: root/playlist.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-10-01 22:45:14 +0200
committerGravatar waker <wakeroid@gmail.com>2012-10-01 22:45:14 +0200
commit3aaf888bfd21412425d9dbf900a72f0e6ca26b89 (patch)
treedf00000f6b589dbc99fe8fbbf0eb3125996b06b4 /playlist.c
parent8f3b1661fd1372508b35de39ca1cc405f1111c0e (diff)
fixed bug in the shuffle albums mode, which would crash the player if a current track was paused, then deleted
Diffstat (limited to 'playlist.c')
-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);
}