From ce244ad595eafff8e78a8f55fbd0004a0b42d789 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Fri, 5 Nov 2004 10:03:46 +0000 Subject: fixed the way the generator works, extended the testing, especially with * gentest.py testapi.c: fixed the way the generator works, extended the testing, especially with more real trees and nodes. * HTMLtree.c tree.c valid.c xinclude.c xmlIO.c xmlsave.c: a bunch of real problems found and fixed. * entities.c: fix error reporting to go through the new handlers Daniel --- HTMLtree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'HTMLtree.c') diff --git a/HTMLtree.c b/HTMLtree.c index c42f8b9f..85bcb1ed 100644 --- a/HTMLtree.c +++ b/HTMLtree.c @@ -745,7 +745,7 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlInitParser(); - if (cur == NULL) { + if ((cur == NULL) || (buf == NULL)) { return; } /* @@ -753,7 +753,8 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, */ if (cur->type == XML_DTD_NODE) return; - if (cur->type == XML_HTML_DOCUMENT_NODE) { + if ((cur->type == XML_HTML_DOCUMENT_NODE) || + (cur->type == XML_DOCUMENT_NODE)){ htmlDocContentDumpOutput(buf, (xmlDocPtr) cur, encoding); return; } -- cgit v1.2.3