From bd896935d6b7cff4b97d1be010ca023c793b83cb Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 11 May 2016 09:48:18 +0200 Subject: [PATCH] Make sure that object names aren't empty fixes #9989 --- lib/config/configitem.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp index f767c4c8d..580bb97f3 100644 --- a/lib/config/configitem.cpp +++ b/lib/config/configitem.cpp @@ -219,6 +219,9 @@ ConfigObject::Ptr ConfigItem::Commit(bool discard) NameComposer *nc = dynamic_cast(type.get()); if (nc) { + if (name.IsEmpty()) + BOOST_THROW_EXCEPTION(ScriptError("Object name must not be empty.", m_DebugInfo)); + name = nc->MakeName(name, dobj); if (name.IsEmpty()) -- 2.40.0