1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-28 07:21:26 +03:00

__xmlRaiseError: fix the structured callback channel's data initialization

if we initialize the structured channel from the sax handler we should also
pass the userData
This commit is contained in:
Дмитрий Левин 2011-02-23 22:30:59 +08:00 committed by Daniel Veillard
parent 1b9128bae7
commit 241d4a1069

View File

@ -461,8 +461,11 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
(domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) {
ctxt = (xmlParserCtxtPtr) ctx;
if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL) &&
(ctxt->sax->initialized == XML_SAX2_MAGIC))
(ctxt->sax->initialized == XML_SAX2_MAGIC) &&
(ctxt->sax->serror != NULL)) {
schannel = ctxt->sax->serror;
data = ctxt->userData;
}
}
/*
* Check if structured error handler set