mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-19 14:50:07 +03:00
parser: Fix spurious error in SAX mode
Short-lived regression from 5f0b1378.
This commit is contained in:
parent
ef44c240f5
commit
25490528af
2
parser.c
2
parser.c
@ -13817,8 +13817,6 @@ xmlCtxtParseDocument(xmlParserCtxtPtr ctxt, xmlParserInputPtr input)
|
||||
xmlParseDocument(ctxt);
|
||||
|
||||
ret = xmlCtxtGetDocument(ctxt);
|
||||
if ((ret == NULL) && (ctxt->errNo == XML_ERR_OK))
|
||||
xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR, "unknown error\n");
|
||||
|
||||
/* assert(ctxt->inputNr == 1); */
|
||||
while (ctxt->inputNr > 0)
|
||||
|
@ -3230,6 +3230,8 @@ xmlCtxtGetDocument(xmlParserCtxtPtr ctxt) {
|
||||
(!xmlCtxtIsCatastrophicError(ctxt)))) {
|
||||
doc = ctxt->myDoc;
|
||||
} else {
|
||||
if (ctxt->errNo == XML_ERR_OK)
|
||||
xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR, "unknown error");
|
||||
doc = NULL;
|
||||
xmlFreeDoc(ctxt->myDoc);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user