Fixed a hideous bu in xmlGetProp, reported by Rune.Djurhuus@fast.no, Daniel.
diff --git a/ChangeLog b/ChangeLog
index b17d0c4..98559d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jan 17 17:04:12 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.c: fixed a hideous bug in xmlGetProp() thanks to
+ Rune.Djurhuus@fast.no
+
Sat Jan 15 15:09:06 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
* TODO: updated
diff --git a/tree.c b/tree.c
index 7616f1b..db2b5d2 100644
--- a/tree.c
+++ b/tree.c
@@ -3398,7 +3398,8 @@
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);