From 323b759a90c9783e737b9a4d3d2eb89c68d9e320 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 17 Dec 2015 13:46:39 +0100 Subject: [PATCH] Fix config validation for templates used as object reference name fixes #10830 --- lib/config/configitem.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp index 51d1301eb..987313d5f 100644 --- a/lib/config/configitem.cpp +++ b/lib/config/configitem.cpp @@ -144,7 +144,12 @@ class DefaultValidationUtils : public ValidationUtils public: virtual bool ValidateName(const String& type, const String& name) const override { - return ConfigItem::GetByTypeAndName(type, name) != ConfigItem::Ptr(); + ConfigItem::Ptr item = ConfigItem::GetByTypeAndName(type, name); + + if (!item || (item && item->IsAbstract())) + return false; + + return true; } }; -- 2.40.0