Commit 79556920 authored by Max Kellermann's avatar Max Kellermann

httpd_output: assert that tag!=NULL

In the tag() method, MPD guarantees that it does not pass tag==NULL. Converted the runtime check to an assertion.
parent 7dcdb2ce
......@@ -378,16 +378,15 @@ httpd_output_tag(void *data, const struct tag *tag)
{
struct httpd_output *httpd = data;
if (httpd->metadata) {
assert(tag != NULL);
if (httpd->metadata != NULL)
page_unref (httpd->metadata);
httpd->metadata = NULL;
}
if (tag)
httpd->metadata = icy_server_metadata_page(tag, TAG_ITEM_ALBUM,
TAG_ITEM_ARTIST,
TAG_ITEM_TITLE,
TAG_NUM_OF_ITEM_TYPES);
httpd->metadata = icy_server_metadata_page(tag, TAG_ITEM_ALBUM,
TAG_ITEM_ARTIST,
TAG_ITEM_TITLE,
TAG_NUM_OF_ITEM_TYPES);
if (httpd->metadata) {
g_mutex_lock(httpd->mutex);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment