diff options
author | waker <wakeroid@gmail.com> | 2009-08-09 22:46:17 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2009-08-09 22:46:17 +0200 |
commit | b7a27737d1ecf9b28ba5294dec29baa9cc6351eb (patch) | |
tree | 469bcba84f5c366dbf30f53d7331f86938b6eb58 /playlist.c | |
parent | cdaa84065ba42c730991c22893ddc8c0d9ce7107 (diff) |
fixed shuffle
Diffstat (limited to 'playlist.c')
-rw-r--r-- | playlist.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -24,6 +24,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> +#include <assert.h> #include "playlist.h" #include "codec.h" #include "cwav.h" @@ -406,7 +407,10 @@ pl_remove (playItem_t *it) { else { playlist_head[PL_SHUFFLE] = next; } - if (!next) { + if (next) { + next->prev[PL_SHUFFLE] = prev; + } + else { playlist_tail[PL_SHUFFLE] = prev; } } @@ -518,6 +522,7 @@ pl_insert_item (playItem_t *after, playItem_t *it) { } else if (idx == pl_count-1) { // append to end + assert (playlist_tail[PL_SHUFFLE]); playlist_tail[PL_SHUFFLE]->next[PL_SHUFFLE] = it; playlist_tail[PL_SHUFFLE] = it; } |