From e6f53dedb704c92af45ede2d97c559cb6639358f Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Mon, 24 Apr 2017 11:25:04 -0400
Subject: [PATCH] MAINT-7343 - Added check for shutdown in progress when asset
 result arrives

---
 indra/newview/llviewerassetstorage.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index bb9195fe90f..6523b89d7f1 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -458,6 +458,12 @@ void LLViewerAssetStorage::assetRequestCoro(
 
     LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts);
 
+    if (LLApp::isQuitting())
+    {
+        // Bail out if result arrives after shutdown has been started.
+        return;
+    }
+    
     LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
     LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
     if (!status)
-- 
GitLab