diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-12-11 22:21:49 +0200 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-12-12 14:39:51 +0200 |
commit | 9f47542597b2902a500be11e8083c608db39350a (patch) | |
tree | d38c57b64229edf6da33ddef091f7a394d3db243 /indra/newview/llpanelenvironment.cpp | |
parent | 0dda1b019985312b88cc72fb3bec44e73a6c666b (diff) |
#3265 Crash at getAllowEnvironmentOverride
Check region pointer and make sure external callbacks get disconected
Diffstat (limited to 'indra/newview/llpanelenvironment.cpp')
-rw-r--r-- | indra/newview/llpanelenvironment.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
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) |