audioplayer.cpp: prevent possible segfault

Origin commit data
------------------
Branch: ni/coolstream
Commit: 138e5d4763
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2015-03-19 (Thu, 19 Mar 2015)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2015-03-19 18:18:13 +01:00
parent 893056e7bb
commit 1975314d5e

View File

@@ -1164,10 +1164,12 @@ void CAudioPlayerGui::scanXmlData(xmlDocPtr answer_parser, const char *nametag,
}
child = child->xmlNextNode;
}
if (strcmp("audio/mpeg", type) == 0) skip = false;
else if (strcmp("application/ogg", type) == 0) skip = false;
else if (strcmp("mp3", type) == 0) skip = false;
else if (strcmp("application/mp3", type) == 0) skip = false;
if(type){
if (strcmp("audio/mpeg", type) == 0) skip = false;
else if (strcmp("application/ogg", type) == 0) skip = false;
else if (strcmp("mp3", type) == 0) skip = false;
else if (strcmp("application/mp3", type) == 0) skip = false;
}
} else {
url = xmlGetAttribute(element, urltag);
name = xmlGetAttribute(element, nametag);