summaryrefslogtreecommitdiff
path: root/src/plugins/xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/xml')
-rw-r--r--src/plugins/xml/XmlOutput.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/xml/XmlOutput.cpp b/src/plugins/xml/XmlOutput.cpp
index cdca730..734c3a5 100644
--- a/src/plugins/xml/XmlOutput.cpp
+++ b/src/plugins/xml/XmlOutput.cpp
@@ -466,7 +466,9 @@ Rooted<Element> transformStructTypeEntry(Handle<Element> parent,
attribute->getAttributes().emplace("type", typeRef);
}
// set the default value.
- if (a->getDefaultValue() != nullptr) {
+ if (!a->getDefaultValue().isNull() &&
+ (!a->getDefaultValue().isObject() ||
+ a->getDefaultValue().asObject() != nullptr)) {
attribute->getAttributes().emplace("default",
toString(a->getDefaultValue(), P));
}