Fix for segfault in sample code.
(cherry picked from commit c05bbec6ec5ab7306b39652b5600e07c29107778)
This commit is contained in:
parent
c38724dfa9
commit
e91e4bea0f
@ -584,7 +584,7 @@ int SampleUtil_FindAndParseService(IXML_Document *DescDoc, const char *location,
|
||||
service = (IXML_Element *)ixmlNodeList_item(serviceList, i);
|
||||
tempServiceType = SampleUtil_GetFirstElementItem(
|
||||
(IXML_Element *)service, "serviceType");
|
||||
if (strcmp(tempServiceType, serviceType) == 0) {
|
||||
if (tempServiceType && strcmp(tempServiceType, serviceType) == 0) {
|
||||
SampleUtil_Print("Found service: %s\n", serviceType);
|
||||
*serviceId = SampleUtil_GetFirstElementItem(service, "serviceId");
|
||||
SampleUtil_Print("serviceId: %s\n", *serviceId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user