aboutsummaryrefslogtreecommitdiffstats
path: root/HTMLtree.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2004-11-05 10:03:46 +0000
committerDaniel Veillard <veillard@src.gnome.org>2004-11-05 10:03:46 +0000
commitce244ad595eafff8e78a8f55fbd0004a0b42d789 (patch)
treefb8626175a731b2846147421ff84760dd777a73d /HTMLtree.c
parent38936066661217110b2d4a2704798de1baeca25e (diff)
downloadandroid_external_libxml2-ce244ad595eafff8e78a8f55fbd0004a0b42d789.tar.gz
android_external_libxml2-ce244ad595eafff8e78a8f55fbd0004a0b42d789.tar.bz2
android_external_libxml2-ce244ad595eafff8e78a8f55fbd0004a0b42d789.zip
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
Diffstat (limited to 'HTMLtree.c')
-rw-r--r--HTMLtree.c5
1 files changed, 3 insertions, 2 deletions
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;
}