Fix another bug with relative object names.

Refs #5925
This commit is contained in:
Gunnar Beutner 2014-04-05 23:07:52 +02:00 committed by Gunnar Beutner
parent 70062b5884
commit 8d81f4b90a
2 changed files with 2 additions and 2 deletions

View File

@ -532,7 +532,7 @@ Value AExpression::OpObject(const AExpression* expr, const Dictionary::Ptr& loca
} }
if (!checkName.IsEmpty()) { if (!checkName.IsEmpty()) {
ConfigItem::Ptr oldItem = ConfigItem::GetObject(type, name); ConfigItem::Ptr oldItem = ConfigItem::GetObject(type, checkName);
if (oldItem) { if (oldItem) {
std::ostringstream msgbuf; std::ostringstream msgbuf;

View File

@ -129,7 +129,7 @@ Dictionary::Ptr ConfigItem::GetProperties(void)
const DynamicObjectNameHelper *nh = dynamic_cast<const DynamicObjectNameHelper *>(Type::GetByName(m_Type)); const DynamicObjectNameHelper *nh = dynamic_cast<const DynamicObjectNameHelper *>(Type::GetByName(m_Type));
if (nh) { if (nh) {
String name = nh->MakeObjectName(m_Name, m_Properties); name = nh->MakeObjectName(m_Name, m_Properties);
if (name.IsEmpty()) if (name.IsEmpty())
BOOST_THROW_EXCEPTION(std::runtime_error("Could not determine name for object")); BOOST_THROW_EXCEPTION(std::runtime_error("Could not determine name for object"));