MAINT-7822 Crash in LLScriptFloaterManager()

meow-7.2.2
Mnikolenko Productengine 2017-09-21 12:19:02 +03:00
parent 307c005efa
commit a27466ca07
2 changed files with 15 additions and 1 deletions

View File

@ -349,8 +349,8 @@ void LLScriptFloater::hideToastsIfNeeded()
//////////////////////////////////////////////////////////////////////////
LLScriptFloaterManager::LLScriptFloaterManager()
: mDialogLimitationsSlot()
{
gSavedSettings.getControl("ScriptDialogLimitations")->getCommitSignal()->connect(boost::bind(&clearScriptNotifications));
}
void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id)
@ -361,6 +361,19 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id)
return;
}
if (!mDialogLimitationsSlot.connected())
{
LLPointer<LLControlVariable> cntrl_ptr = gSavedSettings.getControl("ScriptDialogLimitations");
if (cntrl_ptr.notNull())
{
mDialogLimitationsSlot = cntrl_ptr->getCommitSignal()->connect(boost::bind(&clearScriptNotifications));
}
else
{
LL_WARNS() << "Unable to set signal on setting 'ScriptDialogLimitations'" << LL_ENDL;
}
}
// get scripted Object's ID
LLUUID object_id = notification_id_to_object_id(notification_id);

View File

@ -139,6 +139,7 @@ private:
typedef std::map<LLUUID, FloaterPositionInfo> floater_position_map_t;
floater_position_map_t mFloaterPositions;
boost::signals2::connection mDialogLimitationsSlot;
};
/**