Merge pull request #196 from chme/mpdadd

[queue] fix segfault if query for queue-items returned an empty result
This commit is contained in:
ejurgensen 2015-11-01 16:38:48 +01:00
commit 35253fdeb1

View File

@ -1187,6 +1187,12 @@ queueitem_make_byquery(struct query_params *qp)
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_tail->next = item_head;
item_head->shuffle_prev = item_tail;