diff --git a/ChangeLog b/ChangeLog index c9709b9a..dff58319 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Oct 25 12:11:03 CEST 2000 Daniel Veillard + + * xpath.c: closing bug #29260 + Tue Oct 24 18:49:34 CEST 2000 Daniel Veillard * hash.[ch] debugXML.c: expanded/enhanced the API, added diff --git a/xpath.c b/xpath.c index 545dd07a..4cd20e40 100644 --- a/xpath.c +++ b/xpath.c @@ -1216,11 +1216,11 @@ xmlXPathFreeContext(xmlXPathContextPtr ctxt) { fprintf(xmlXPathDebug, "%s:%d Internal error: no context\n", \ __FILE__, __LINE__); \ } \ - if (ctxt->doc == NULL) { \ + else if (ctxt->doc == NULL) { \ fprintf(xmlXPathDebug, "%s:%d Internal error: no document\n", \ __FILE__, __LINE__); \ } \ - if (ctxt->doc->children == NULL) { \ + else if (ctxt->doc->children == NULL) { \ fprintf(xmlXPathDebug, \ "%s:%d Internal error: document without root\n", \ __FILE__, __LINE__); \ @@ -5143,10 +5143,11 @@ xmlXPathEval(const xmlChar *str, xmlXPathContextPtr ctx) { xmlXPathInit(); - CHECK_CONTEXT(ctx) - if (xmlXPathDebug == NULL) xmlXPathDebug = stderr; + + CHECK_CONTEXT(ctx) + ctxt = xmlXPathNewParserContext(str, ctx); if (ctx->node != NULL) { init = xmlXPathNewNodeSet(ctx->node);