From: Gunnar Beutner Date: Tue, 18 Aug 2015 18:25:06 +0000 (+0200) Subject: Fix crash in ConfigObjectUtility::CreateObject X-Git-Tag: v2.4.0~394 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b3db2ee1f605d4b658478bea89aa3272eaad8359;p=icinga2 Fix crash in ConfigObjectUtility::CreateObject refs #9082 --- 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);