From 17fb7d0bf4cc4db1c3f30dbbbdee7610d168336c Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 17 Sep 2018 14:21:38 -0700 Subject: SL-9667, SL-9669: Do not attempt to request environment for non-eep parcels, use handle to panel passed to static for callbacks. --- indra/newview/llfloaterland.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterland.cpp') diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 38ced18edf..453c9f1138 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -3304,6 +3304,14 @@ void LLPanelLandEnvironment::refreshFromSource() { LLParcel *parcel = getParcel(); + if (!LLEnvironment::instance().isExtendedEnvironmentEnabled()) + { + setNoEnvironmentSupport(true); + setControlsEnabled(false); + return; + } + setNoEnvironmentSupport(false); + if (!parcel) { setNoSelection(true); @@ -3316,8 +3324,16 @@ void LLPanelLandEnvironment::refreshFromSource() { setCrossRegion(false); + LLHandle that_h = getHandle(); + LLEnvironment::instance().requestParcel(parcel->getLocalID(), - [this](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { mLastParcelId = parcel_id; onEnvironmentReceived(parcel_id, envifo); }); + [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) + { + LLPanelLandEnvironment *that = (LLPanelLandEnvironment*)that_h.get(); + if (!that) return; + that->mLastParcelId = parcel_id; + that->onEnvironmentReceived(parcel_id, envifo); + }); } else { -- cgit v1.3