xinclude: Don't try to fix base of non-elements

This would result in a spurious error.
This commit is contained in:
Nick Wellnhofer 2024-04-05 13:19:56 +02:00
parent af2bda4e87
commit 16ccb61dc1

View File

@ -615,6 +615,9 @@ xmlXIncludeBaseFixup(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur, xmlNodePtr copy,
xmlNs ns; xmlNs ns;
int res; int res;
if (cur->type != XML_ELEMENT_NODE)
return;
if (xmlNodeGetBaseSafe(cur->doc, cur, &base) < 0) if (xmlNodeGetBaseSafe(cur->doc, cur, &base) < 0)
xmlXIncludeErrMemory(ctxt); xmlXIncludeErrMemory(ctxt);