diff options
| author | Rider Linden <rider@lindenlab.com> | 2018-09-17 14:21:38 -0700 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2018-09-17 14:21:38 -0700 |
| commit | 17fb7d0bf4cc4db1c3f30dbbbdee7610d168336c (patch) | |
| tree | b3b48dcbe06af0df45696245bdc4639cdc346a27 /indra/newview/llfloaterland.cpp | |
| parent | 53a93d3e73892f633b1d79de359924d733489bdb (diff) | |
SL-9667, SL-9669: Do not attempt to request environment for non-eep parcels, use handle to panel passed to static for callbacks.
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
| -rw-r--r-- | indra/newview/llfloaterland.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
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<LLPanel> 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 { |
