diff options
-rw-r--r-- | common/playlist.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/playlist.c b/common/playlist.c index 9080a27ae9..e33fbd36c8 100644 --- a/common/playlist.c +++ b/common/playlist.c @@ -119,10 +119,13 @@ void playlist_clear(struct playlist *pl) pl->current_was_replaced = false; } -// Moves entry such that entry->prev = at (even if at is NULL) +// Moves the entry so that it takes "at"'s place (or move to end, if at==NULL). void playlist_move(struct playlist *pl, struct playlist_entry *entry, struct playlist_entry *at) { + if (entry == at) + return; + struct playlist_entry *save_current = pl->current; bool save_replaced = pl->current_was_replaced; |