Merge pull request #28 from chme/fixaddnext

Fix crash when calling add-next and cur_playing/cur_streaming are NULL
This commit is contained in:
ejurgensen 2014-05-17 20:23:04 +02:00
commit 66a8cad434
1 changed files with 2 additions and 2 deletions

View File

@ -3429,9 +3429,9 @@ queue_add_next(struct player_command *cmd)
if (!ps_shuffle) if (!ps_shuffle)
ps_shuffle = ps; 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 // Insert ps after ps_playing
ps->pl_prev->pl_next = ps_playing->pl_next; ps->pl_prev->pl_next = ps_playing->pl_next;