From a4137d72ebc9f49dfd8bd124b255da0dfbc4ba92 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 3 Jul 2018 14:18:24 -0700 Subject: MAINT-8821: New "My Environments" floater. First pass. --- indra/newview/llfloaterfixedenvironment.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterfixedenvironment.cpp') diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index 7efd45ca56..fd72bb3624 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -317,8 +317,12 @@ void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where) if (!parcel) parcel = LLViewerParcelMgr::instance().getAgentParcel(); - if (!parcel) + if ((!parcel) || (parcel->getLocalID() == INVALID_PARCEL_ID)) + { + LL_WARNS("ENVIRONMENT") << "Can not identify parcel. Not applying." << LL_ENDL; + LLNotificationsUtil::add("WLParcelApplyFail"); return; + } if (mSettings->getSettingsType() == "sky") LLEnvironment::instance().updateParcel(parcel->getLocalID(), std::static_pointer_cast(mSettings), -1, -1); -- cgit v1.2.3