File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -2100,8 +2100,14 @@ LLPanelEstateInfo::LLPanelEstateInfo()
2100
2100
mEstateID(0 ) // invalid
2101
2101
{
2102
2102
LLEstateInfoModel& estate_info = LLEstateInfoModel::instance ();
2103
- estate_info.setCommitCallback (boost::bind (&LLPanelEstateInfo::refreshFromEstate, this ));
2104
- estate_info.setUpdateCallback (boost::bind (&LLPanelEstateInfo::refreshFromEstate, this ));
2103
+ mEstateInfoCommitConnection = estate_info.setCommitCallback (boost::bind (&LLPanelEstateInfo::refreshFromEstate, this ));
2104
+ mEstateInfoUpdateConnection = estate_info.setUpdateCallback (boost::bind (&LLPanelEstateInfo::refreshFromEstate, this ));
2105
+ }
2106
+
2107
+ LLPanelEstateInfo::~LLPanelEstateInfo ()
2108
+ {
2109
+ mEstateInfoCommitConnection .disconnect ();
2110
+ mEstateInfoUpdateConnection .disconnect ();
2105
2111
}
2106
2112
2107
2113
// static
Original file line number Diff line number Diff line change @@ -320,7 +320,7 @@ class LLPanelEstateInfo : public LLPanelRegionInfo
320
320
bool onMessageCommit (const LLSD& notification, const LLSD& response);
321
321
322
322
LLPanelEstateInfo ();
323
- ~LLPanelEstateInfo () {}
323
+ ~LLPanelEstateInfo ();
324
324
325
325
void updateControls (LLViewerRegion* region);
326
326
@@ -352,6 +352,8 @@ class LLPanelEstateInfo : public LLPanelRegionInfo
352
352
bool checkSunHourSlider (LLUICtrl* child_ctrl);
353
353
354
354
U32 mEstateID ;
355
+ boost::signals2::connection mEstateInfoCommitConnection ;
356
+ boost::signals2::connection mEstateInfoUpdateConnection ;
355
357
};
356
358
357
359
// ///////////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change @@ -359,12 +359,14 @@ void LLPanelEnvironmentInfo::refresh()
359
359
360
360
void LLPanelEnvironmentInfo::refreshFromEstate ()
361
361
{
362
- LLViewerRegion *pRegion = gAgent .getRegion ();
363
-
364
- bool oldAO = mAllowOverride ;
365
- mAllowOverride = (isRegion () && LLEstateInfoModel::instance ().getAllowEnvironmentOverride ()) || pRegion->getAllowEnvironmentOverride ();
366
- if (oldAO != mAllowOverride )
367
- refresh ();
362
+ LLViewerRegion* pRegion = gAgent .getRegion ();
363
+ if (pRegion)
364
+ {
365
+ bool oldAO = mAllowOverride ;
366
+ mAllowOverride = (isRegion () && LLEstateInfoModel::instance ().getAllowEnvironmentOverride ()) || pRegion->getAllowEnvironmentOverride ();
367
+ if (oldAO != mAllowOverride )
368
+ refresh ();
369
+ }
368
370
}
369
371
370
372
std::string LLPanelEnvironmentInfo::getNameForTrackIndex (U32 index)
You can’t perform that action at this time.
0 commit comments