diff --git a/xpath.c b/xpath.c old mode 100644 new mode 100755 index 65a9f09e..9cbd6650 --- a/xpath.c +++ b/xpath.c @@ -8626,6 +8626,7 @@ xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs) { return; } obj = xmlXPathCacheConvertString(ctxt->context, obj); + if (obj == NULL) return; ret = xmlXPathGetElementsByIds(ctxt->context->doc, obj->stringval); valuePush(ctxt, xmlXPathCacheWrapNodeSet(ctxt->context, ret)); xmlXPathReleaseObject(ctxt->context, obj);