Index: libxml2-2.13.8/schematron.c =================================================================== --- libxml2-2.13.8.orig/schematron.c +++ libxml2-2.13.8/schematron.c @@ -1509,6 +1509,8 @@ xmlSchematronFormatReport(xmlSchematronV select = xmlGetNoNsProp(child, BAD_CAST "select"); comp = xmlXPathCtxtCompile(ctxt->xctxt, select); eval = xmlXPathCompiledEval(comp, ctxt->xctxt); + if (eval == NULL) + return ret; switch (eval->type) { case XPATH_NODESET: {