Index: ps/trunk/source/gui/CGUI.cpp =================================================================== --- ps/trunk/source/gui/CGUI.cpp +++ ps/trunk/source/gui/CGUI.cpp @@ -715,11 +715,7 @@ if (attr.Name == attr_z) ManuallySetZ = true; - const CStr settingName = pFile->GetAttributeString(attr.Name); - if (object->SettingExists(settingName)) - object->SetSettingFromString(settingName, attr.Value.FromUTF8(), false); - else - LOGERROR("GUI: (object: %s) Can't set \"%s\" to \"%s\"", object->GetPresentableName(), settingName, attr.Value); + object->SetSettingFromString(pFile->GetAttributeString(attr.Name), attr.Value.FromUTF8(), false); } // Check if name isn't set, generate an internal name in that case. Index: ps/trunk/source/gui/IGUIObject.cpp =================================================================== --- ps/trunk/source/gui/IGUIObject.cpp +++ ps/trunk/source/gui/IGUIObject.cpp @@ -148,7 +148,13 @@ bool IGUIObject::SetSettingFromString(const CStr& Setting, const CStrW& Value, const bool SendMessage) { - return m_Settings[Setting]->FromString(Value, SendMessage); + const std::map::iterator it = m_Settings.find(Setting); + if (it == m_Settings.end()) + { + LOGERROR("GUI object '%s' has no property called '%s', can't set parse and set value '%s'", GetPresentableName().c_str(), Setting.c_str(), Value.ToUTF8().c_str()); + return false; + } + return it->second->FromString(Value, SendMessage); } template