From b15f30a9ce6f7ac7057a9daf7a4072426baf25d9 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 30 Jun 2021 17:34:30 +0300 Subject: SL-15501 Viewer crash with unprotected use of std::vector::front() --- indra/newview/llappearancemgr.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 31b5cf9aaa..fd712ea5d0 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -4267,6 +4267,17 @@ public: } virtual void done() { + if (mComplete.size() <= 0) + { + // Ex: timeout + LL_WARNS() << "Failed to load data. Removing observer " << LL_ENDL; + gInventory.removeObserver(this); + doOnIdleOneTime(mCallable); + + delete this; + return; + } + // What we do here is get the complete information on the // items in the requested category, and set up an observer // that will wait for that to happen. -- cgit v1.2.3