From 434bd7ae4f4d69996eac4b0fa3fba33ac01faec0 Mon Sep 17 00:00:00 2001 From: spo Date: Tue, 24 May 2016 16:09:52 +0300 Subject: [PATCH] Model_Data sends an error if attribute doesn't exist --- src/Model/Model_Data.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Model/Model_Data.cpp b/src/Model/Model_Data.cpp index 1844bde49..84548b6df 100644 --- a/src/Model/Model_Data.cpp +++ b/src/Model/Model_Data.cpp @@ -195,6 +195,8 @@ AttributePtr Model_Data::addAttribute(const std::string& theID, const std::strin myAttrs.find(theID); \ if (aFound != myAttrs.end()) { \ aRes = std::dynamic_pointer_cast(aFound->second); \ + } else { \ + Events_Error::send("Can not receive unknown attribute " + theID + " of type " + #ATTR_TYPE); \ } \ return aRes; \ } -- 2.39.2