From 9f47542597b2902a500be11e8083c608db39350a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 11 Dec 2024 22:21:49 +0200 Subject: #3265 Crash at getAllowEnvironmentOverride Check region pointer and make sure external callbacks get disconected --- indra/newview/llfloaterregioninfo.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloaterregioninfo.cpp') 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 -- cgit v1.2.3