1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

Remove htmlDefaultSAXHandler from non-SAX1 build

This matches long-standing behavior of the XML counterpart.
This commit is contained in:
Nick Wellnhofer
2022-08-22 14:11:15 +02:00
parent 80bd34c3c6
commit 4b184240be
3 changed files with 6 additions and 2 deletions

View File

@ -6338,7 +6338,9 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
if(enc==XML_CHAR_ENCODING_UTF8 || buf->encoder)
ctxt->charset=XML_CHAR_ENCODING_UTF8;
if (sax != NULL) {
#ifdef LIBXML_SAX1_ENABLED
if (ctxt->sax != (xmlSAXHandlerPtr) &htmlDefaultSAXHandler)
#endif
xmlFree(ctxt->sax);
ctxt->sax = (htmlSAXHandlerPtr) xmlMalloc(sizeof(htmlSAXHandler));
if (ctxt->sax == NULL) {