- Fix crash when calling add-next and cur_playing/cur_streaming are NULL

- Append songs after cur_streaming
This commit is contained in:
chme 2014-05-17 14:13:18 +02:00
parent 1e2f7b0c5e
commit a1b09903c0

View File

@ -3429,9 +3429,9 @@ queue_add_next(struct player_command *cmd)
if (!ps_shuffle)
ps_shuffle = ps;
if (source_head)
if (source_head && cur_streaming)
{
ps_playing = cur_playing ? cur_playing : cur_streaming;
ps_playing = cur_streaming;
// Insert ps after ps_playing
ps->pl_prev->pl_next = ps_playing->pl_next;