From b3db2ee1f605d4b658478bea89aa3272eaad8359 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 18 Aug 2015 20:25:06 +0200 Subject: [PATCH] Fix crash in ConfigObjectUtility::CreateObject refs #9082 --- lib/remote/configobjectutility.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/remote/configobjectutility.cpp b/lib/remote/configobjectutility.cpp index a87cecf6f..2968ccdb2 100644 --- a/lib/remote/configobjectutility.cpp +++ b/lib/remote/configobjectutility.cpp @@ -132,7 +132,10 @@ bool ConfigObjectUtility::CreateObject(const Type::Ptr& type, const String& full Dictionary::Ptr allAttrs = new Dictionary(); attrs->CopyTo(allAttrs); - nameParts->CopyTo(allAttrs); + + if (nameParts) + nameParts->CopyTo(allAttrs); + allAttrs->Remove("name"); ConfigWriter::Ptr cw = new ConfigWriter(path);