From a067e656fd9df40c71fc7c8a744dbbc3c893e565 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Thu, 1 May 2003 08:03:46 +0000 Subject: [PATCH] fixed a problem with xmlUnlinkNode() for DTDs. Daniel * tree.c: fixed a problem with xmlUnlinkNode() for DTDs. Daniel --- ChangeLog | 4 ++++ tree.c | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 803dbcfa..b24fb892 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu May 1 10:02:35 CEST 2003 Daniel Veillard + + * tree.c: fixed a problem with xmlUnlinkNode() for DTDs. + Wed Apr 30 14:16:08 CEST 2003 Daniel Veillard * xml2-config.in: try to fix Red hat bug #89957, do not diff --git a/tree.c b/tree.c index b2445f00..8da828ab 100644 --- a/tree.c +++ b/tree.c @@ -3250,10 +3250,12 @@ xmlUnlinkNode(xmlNodePtr cur) { if (cur->type == XML_DTD_NODE) { xmlDocPtr doc; doc = cur->doc; - if (doc->intSubset == (xmlDtdPtr) cur) - doc->intSubset = NULL; - if (doc->extSubset == (xmlDtdPtr) cur) - doc->extSubset = NULL; + if (doc != NULL) { + if (doc->intSubset == (xmlDtdPtr) cur) + doc->intSubset = NULL; + if (doc->extSubset == (xmlDtdPtr) cur) + doc->extSubset = NULL; + } } if (cur->parent != NULL) { xmlNodePtr parent;