diff --git a/xpath.c b/xpath.c index d64a6ffc..72193030 100644 --- a/xpath.c +++ b/xpath.c @@ -14370,6 +14370,8 @@ xmlXPathCompiledEvalInternal(xmlXPathCompExprPtr comp, } #endif pctxt = xmlXPathCompParserContext(comp, ctxt); + if (pctxt == NULL) + return(-1); res = xmlXPathRunEval(pctxt, toBool); if (pctxt->error != XPATH_EXPRESSION_OK) {