diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-04-09 16:31:06 +0200 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2016-04-25 22:19:35 +0200 |
commit | 353b2fa76fba37b3ff0b73e23a2e422897ef876a (patch) | |
tree | bb9d8a411ccaae9ebd36936e8ca6662ebc7bdff6 /src/plugins/xml | |
parent | 7a303c1dd75497c767b174380bb06be4f0b43131 (diff) |
fixed a bug in default value handling.
Diffstat (limited to 'src/plugins/xml')
-rw-r--r-- | src/plugins/xml/XmlOutput.cpp | 4 |
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)); } |