From 1b900651f193c3750b51b9e945797e1f6d3c63f5 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 21 Apr 2021 22:36:24 +0300 Subject: SL-14956 Fix landmarks sometimes staying in mLoadedCallbackMap --- indra/newview/lllandmarklist.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index 0a05ce6ab8..b88ef39a07 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -221,21 +221,15 @@ void LLLandmarkList::onRegionHandle(const LLUUID& landmark_id) { LLLandmark* landmark = getAsset(landmark_id); - if (!landmark) - { - LL_WARNS() << "Got region handle but the landmark not found." << LL_ENDL; - return; - } - // Calculate landmark global position. // This should succeed since the region handle is available. LLVector3d pos; - if (!landmark->getGlobalPos(pos)) + if (landmark && !landmark->getGlobalPos(pos)) { - LL_WARNS() << "Got region handle but the landmark global position is still unknown." << LL_ENDL; - return; + LL_WARNS() << "Got region handle but the landmark " << landmark_id << " global position is still unknown." << LL_ENDL; } + // Call this even if no landmark exists to clean mLoadedCallbackMap makeCallbacks(landmark_id); } @@ -245,7 +239,7 @@ void LLLandmarkList::makeCallbacks(const LLUUID& landmark_id) if (!landmark) { - LL_WARNS() << "Landmark to make callbacks for not found." << LL_ENDL; + LL_WARNS() << "Landmark " << landmark_id << " to make callbacks for not found." << LL_ENDL; } // make all the callbacks here. -- cgit v1.2.3