summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-04-09 16:31:06 +0200
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2016-04-25 22:19:35 +0200
commit353b2fa76fba37b3ff0b73e23a2e422897ef876a (patch)
treebb9d8a411ccaae9ebd36936e8ca6662ebc7bdff6 /src/plugins
parent7a303c1dd75497c767b174380bb06be4f0b43131 (diff)
fixed a bug in default value handling.
Diffstat (limited to 'src/plugins')
-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));
}