1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-31 06:50:06 +03:00

tree: Fix error return in xmlGetPropNodeValueInternal

This commit is contained in:
Nick Wellnhofer 2024-03-07 13:02:46 +01:00
parent e4e9096164
commit 18ebdacf80

3
tree.c
View File

@ -6578,7 +6578,8 @@ xmlGetPropNodeValueInternal(const xmlAttr *prop)
/*
* Optimization for the common case: only 1 text node.
*/
return(xmlStrdup(prop->children->content));
if (prop->children->content != NULL)
return(xmlStrdup(prop->children->content));
} else {
return(xmlNodeListGetString(prop->doc, prop->children, 1));
}