From 21b592865228bacf07ec8a526f1756bae69597e0 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 28 Jan 2023 02:01:49 +0200 Subject: SL-19097 Crash when selecting a model for upload and waiting too long Should be fixed by SL-18996, but just in case user decides to select a model while viewer closes --- indra/llprimitive/llmodelloader.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/llmodelloader.cpp b/indra/llprimitive/llmodelloader.cpp index 5171621007..3dd1652154 100644 --- a/indra/llprimitive/llmodelloader.cpp +++ b/indra/llprimitive/llmodelloader.cpp @@ -25,6 +25,8 @@ */ #include "llmodelloader.h" + +#include "llapp.h" #include "llsdserialize.h" #include "lljoint.h" #include "llcallbacklist.h" @@ -363,7 +365,10 @@ bool LLModelLoader::isAlive(LLModelLoader* loader) void LLModelLoader::loadModelCallback() { - mLoadCallback(mScene,mModelList,mLod, mOpaqueData); + if (!LLApp::isExiting()) + { + mLoadCallback(mScene, mModelList, mLod, mOpaqueData); + } while (!isStopped()) { //wait until this thread is stopped before deleting self -- cgit v1.2.3