Commit 890faa54 authored by Pietro Cerutti's avatar Pietro Cerutti Committed by Daniel Veillard
Browse files

Fix problem with specific and generic error handlers

It seems that setting up both xmlTextReaderSetStructuredErrorHandler and
xmlSetStructuredErrorFunc confuses the code around error.c:592 and following
This patch works with any combinations of using xmlSetStructuredErrorFunc,
xmlTextReaderSetStructuredErrorHandler, both, or none.
parent 466fcdaa
......@@ -615,8 +615,11 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
data = ctxt->userData;
} else if (channel == NULL) {
channel = xmlGenericError;
if (!data)
if (ctxt != NULL) {
data = ctxt;
} else {
data = xmlGenericErrorContext;
}
}
if (channel == NULL)
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment