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:
parent
e4e9096164
commit
18ebdacf80
3
tree.c
3
tree.c
@ -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));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user