Fix for an internal crash, could only happen if settings were copied into install improperly, but better safe than sorry.

This commit is contained in:
Lirusaito
2014-04-26 10:19:04 -04:00
parent 40f9e12bdf
commit 1502ef2661

View File

@@ -145,6 +145,11 @@ void LLDropTarget::setControlName(const std::string& control_name, LLView* conte
else else
{ {
mControl = gSavedPerAccountSettings.getControl(control_name); mControl = gSavedPerAccountSettings.getControl(control_name);
if (!mControl)
{
llerrs << "Could not find control \"" << control_name << "\" in gSavedPerAccountSettings" << llendl;
return; // Though this should never happen.
}
const LLUUID id(mControl->getValue().asString()); const LLUUID id(mControl->getValue().asString());
if (id.isNull()) if (id.isNull())
text = LLTrans::getString("CurrentlyNotSet"); text = LLTrans::getString("CurrentlyNotSet");