diff --git a/core/parse-xml.c b/core/parse-xml.c index d42d95bde..ecde453e6 100644 --- a/core/parse-xml.c +++ b/core/parse-xml.c @@ -2348,6 +2348,9 @@ static xmlDoc *test_xslt_transforms(xmlDoc *doc, const struct xml_params *params xmlNode *root_element = xmlDocGetRootElement(doc); xmlChar *attribute; + if (!root_element) + return NULL; + while (info->root) { if ((strcasecmp((const char *)root_element->name, info->root) == 0)) { if (info->attribute == NULL)