From 925161d9b477ff47ffff6f51898ce878ad62620d 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 d3af15d3d..a6c959e58 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; } };