[libxml2] Fix a small problem on previous HTML parser patch



commit db4ac221f061e0e49e408e395980d954e272a14e
Author: Daniel Veillard <veillard redhat com>
Date:   Sat Aug 22 17:58:31 2009 +0200

    Fix a small problem on previous HTML parser patch

 HTMLparser.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/HTMLparser.c b/HTMLparser.c
index b2c9c52..c757e45 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -4080,14 +4080,15 @@ htmlParseElement(htmlParserCtxtPtr ctxt) {
     int depth;
     const xmlChar *oldptr;
 
-    if (ctxt->instate == XML_PARSER_EOF)
-        return;
-
     if ((ctxt == NULL) || (ctxt->input == NULL)) {
 	htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
 		     "htmlParseElement: context error\n", NULL, NULL);
 	return;
     }
+
+    if (ctxt->instate == XML_PARSER_EOF)
+        return;
+
     /* Capture start position */
     if (ctxt->record_info) {
         node_info.begin_pos = ctxt->input->consumed +



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]