diff --git a/ChangeLog b/ChangeLog index b17d0c4b..98559d8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jan 17 17:04:12 CET 2000 Daniel Veillard + + * tree.c: fixed a hideous bug in xmlGetProp() thanks to + Rune.Djurhuus@fast.no + Sat Jan 15 15:09:06 CET 2000 Daniel Veillard * TODO: updated diff --git a/tree.c b/tree.c index 7616f1b4..db2b5d26 100644 --- a/tree.c +++ b/tree.c @@ -3398,7 +3398,8 @@ xmlGetProp(xmlNodePtr node, const xmlChar *name) { attrDecl = xmlGetDtdAttrDesc(doc->intSubset, node->name, name); if ((attrDecl == NULL) && (doc->extSubset != NULL)) attrDecl = xmlGetDtdAttrDesc(doc->extSubset, node->name, name); - return(xmlStrdup(attrDecl->defaultValue)); + if (attrDecl != NULL) + return(xmlStrdup(attrDecl->defaultValue)); } } return(NULL);