diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2002-01-24 15:02:46 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2002-01-24 15:02:46 +0000 |
commit | 3606581dcd45fbabfa95ce3565918d0c7e407633 (patch) | |
tree | 55e7cb4667c549acb1f6c35102610382c19fd2a5 /entities.c | |
parent | 5173727616a7e9ef8e6a2d3c256685413593b1bc (diff) | |
download | android_external_libxml2-3606581dcd45fbabfa95ce3565918d0c7e407633.tar.gz android_external_libxml2-3606581dcd45fbabfa95ce3565918d0c7e407633.tar.bz2 android_external_libxml2-3606581dcd45fbabfa95ce3565918d0c7e407633.zip |
another set of patches from Anthony Jones for copy operations cleanup and
* valid.c tree.c entities.c: another set of patches from
Anthony Jones for copy operations cleanup and robustness
Daniel
Diffstat (limited to 'entities.c')
-rw-r--r-- | entities.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -323,6 +323,8 @@ xmlGetParameterEntity(xmlDocPtr doc, const xmlChar *name) { xmlEntitiesTablePtr table; xmlEntityPtr ret; + if (doc == NULL) + return(NULL); if ((doc->intSubset != NULL) && (doc->intSubset->pentities != NULL)) { table = (xmlEntitiesTablePtr) doc->intSubset->pentities; ret = xmlGetEntityFromTable(table, name); @@ -343,6 +345,7 @@ xmlGetParameterEntity(xmlDocPtr doc, const xmlChar *name) { * * Do an entity lookup in the DTD entity hash table and * returns the corresponding entity, if found. + * Note: the first argument is the document node, not the DTD node. * * Returns A pointer to the entity structure or NULL if not found. */ @@ -350,6 +353,8 @@ xmlEntityPtr xmlGetDtdEntity(xmlDocPtr doc, const xmlChar *name) { xmlEntitiesTablePtr table; + if (doc == NULL) + return(NULL); if ((doc->extSubset != NULL) && (doc->extSubset->entities != NULL)) { table = (xmlEntitiesTablePtr) doc->extSubset->entities; return(xmlGetEntityFromTable(table, name)); |