diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-09-21 12:19:02 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-09-21 12:19:02 +0300 |
commit | a27466ca07e5568442053e02ac9e76297ee74787 (patch) | |
tree | a0104cf5ab0454725435213839eea4045d5ce87a /indra | |
parent | 307c005efabe0da3f8fbc3d2d89468db66d37b18 (diff) |
MAINT-7822 Crash in LLScriptFloaterManager()
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llscriptfloater.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llscriptfloater.h | 1 |
2 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index b2c450aa0c..da912ef3d4 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -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); diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index 0192a8893e..3695b8a3e1 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -139,6 +139,7 @@ private: typedef std::map<LLUUID, FloaterPositionInfo> floater_position_map_t; floater_position_map_t mFloaterPositions; + boost::signals2::connection mDialogLimitationsSlot; }; /** |