mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-10-26 12:25:09 +03:00
Fix xmlTextWriterWriteElement when a null content is given
This commit is contained in:
parent
190a0b8939
commit
c9ecf45d1b
10
xmlwriter.c
10
xmlwriter.c
@ -2242,10 +2242,12 @@ xmlTextWriterWriteElement(xmlTextWriterPtr writer, const xmlChar * name,
|
||||
if (count == -1)
|
||||
return -1;
|
||||
sum += count;
|
||||
count = xmlTextWriterWriteString(writer, content);
|
||||
if (count == -1)
|
||||
return -1;
|
||||
sum += count;
|
||||
if (content != NULL) {
|
||||
count = xmlTextWriterWriteString(writer, content);
|
||||
if (count == -1)
|
||||
return -1;
|
||||
sum += count;
|
||||
}
|
||||
count = xmlTextWriterEndElement(writer);
|
||||
if (count == -1)
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user