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:
parent
1b9128bae7
commit
241d4a1069
5
error.c
5
error.c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user