diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 6880cf217189e663448827cfef7a99394b3909fa..ba0ebc6fe7c4d737ed89286bc01e7188d4554cb2 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -579,6 +579,12 @@ void chatterBoxHistoryCoro(std::string url, LLUUID sessionId, std::string from,
         return;
     }
 
+    if (LLApp::isExiting() || gDisconnected)
+    {
+        LL_DEBUGS("ChatHistory") << "Ignoring chat history response, shutting down" << LL_ENDL;
+        return;
+    }
+
     // Add history to IM session
     LLSD history = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_CONTENT];
 
@@ -3913,6 +3919,12 @@ class LLViewerChatterBoxSessionStartReply : public LLHTTPNode
 					  const LLSD& context,
 					  const LLSD& input) const
 	{
+        if (LLApp::isExiting() || gDisconnected)
+        {
+            LL_DEBUGS("ChatHistory") << "Ignoring ChatterBox session, Shutting down" << LL_ENDL;
+            return;
+        }
+
 		LLSD body;
 		LLUUID temp_session_id;
 		LLUUID session_id;