summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterregioninfo.cpp10
-rw-r--r--indra/newview/llfloaterregioninfo.h4
-rw-r--r--indra/newview/llpanelenvironment.cpp14
3 files changed, 19 insertions, 9 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index efeee1ad3c..3239921259 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -2100,8 +2100,14 @@ LLPanelEstateInfo::LLPanelEstateInfo()
mEstateID(0) // invalid
{
LLEstateInfoModel& estate_info = LLEstateInfoModel::instance();
- estate_info.setCommitCallback(boost::bind(&LLPanelEstateInfo::refreshFromEstate, this));
- estate_info.setUpdateCallback(boost::bind(&LLPanelEstateInfo::refreshFromEstate, this));
+ mEstateInfoCommitConnection = estate_info.setCommitCallback(boost::bind(&LLPanelEstateInfo::refreshFromEstate, this));
+ mEstateInfoUpdateConnection = estate_info.setUpdateCallback(boost::bind(&LLPanelEstateInfo::refreshFromEstate, this));
+}
+
+LLPanelEstateInfo::~LLPanelEstateInfo()
+{
+ mEstateInfoCommitConnection.disconnect();
+ mEstateInfoUpdateConnection.disconnect();
}
// static
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index 65c1291728..201d8b0a68 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -320,7 +320,7 @@ public:
bool onMessageCommit(const LLSD& notification, const LLSD& response);
LLPanelEstateInfo();
- ~LLPanelEstateInfo() {}
+ ~LLPanelEstateInfo();
void updateControls(LLViewerRegion* region);
@@ -352,6 +352,8 @@ protected:
bool checkSunHourSlider(LLUICtrl* child_ctrl);
U32 mEstateID;
+ boost::signals2::connection mEstateInfoCommitConnection;
+ boost::signals2::connection mEstateInfoUpdateConnection;
};
/////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index d3df88b65e..831ad7827a 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -359,12 +359,14 @@ void LLPanelEnvironmentInfo::refresh()
void LLPanelEnvironmentInfo::refreshFromEstate()
{
- LLViewerRegion *pRegion = gAgent.getRegion();
-
- bool oldAO = mAllowOverride;
- mAllowOverride = (isRegion() && LLEstateInfoModel::instance().getAllowEnvironmentOverride()) || pRegion->getAllowEnvironmentOverride();
- if (oldAO != mAllowOverride)
- refresh();
+ LLViewerRegion* pRegion = gAgent.getRegion();
+ if (pRegion)
+ {
+ bool oldAO = mAllowOverride;
+ mAllowOverride = (isRegion() && LLEstateInfoModel::instance().getAllowEnvironmentOverride()) || pRegion->getAllowEnvironmentOverride();
+ if (oldAO != mAllowOverride)
+ refresh();
+ }
}
std::string LLPanelEnvironmentInfo::getNameForTrackIndex(U32 index)