summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2011-02-23 14:30:59 (GMT)
committerDaniel Veillard <veillard@redhat.com>2011-02-23 14:30:59 (GMT)
commit241d4a1069e6bedd0ee2295d7b43858109c1c6d1 (patch)
tree54a42fc992dc730da69457c2d096f7d8eaa9a87f
parent1b9128bae737fa559f5e2c191d6679a856efbad9 (diff)
downloadlibxml2-241d4a1069e6bedd0ee2295d7b43858109c1c6d1.tar.gz
libxml2-241d4a1069e6bedd0ee2295d7b43858109c1c6d1.tar.xz
__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
-rw-r--r--error.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/error.c b/error.c
index 15b431e..9c0f6bb 100644
--- a/error.c
+++ b/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