mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 23:55:57 -05:00
Merge pull request #196 from chme/mpdadd
[queue] fix segfault if query for queue-items returned an empty result
This commit is contained in:
commit
35253fdeb1
@ -1187,6 +1187,12 @@ queueitem_make_byquery(struct query_params *qp)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!item_head || !item_tail)
|
||||||
|
{
|
||||||
|
DPRINTF(E_INFO, L_PLAYER, "No item found to add to queue\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
item_head->prev = item_tail;
|
item_head->prev = item_tail;
|
||||||
item_tail->next = item_head;
|
item_tail->next = item_head;
|
||||||
item_head->shuffle_prev = item_tail;
|
item_head->shuffle_prev = item_tail;
|
||||||
|
Loading…
Reference in New Issue
Block a user