From 353b2fa76fba37b3ff0b73e23a2e422897ef876a Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Thu, 9 Apr 2015 16:31:06 +0200 Subject: fixed a bug in default value handling. --- src/plugins/xml/XmlOutput.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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 transformStructTypeEntry(Handle 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)); } -- cgit v1.2.3