From 88100d8f62b81f02354663dc542e5b8a2ebb45b4 Mon Sep 17 00:00:00 2001
From: andreykproductengine <andreykproductengine@lindenlab.com>
Date: Tue, 22 Oct 2019 19:05:29 +0300
Subject: [PATCH] SL-12169 Crash on setToolBarsVisible() during exit

---
 indra/newview/llagent.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 31b8b905188..be90e623adc 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -2022,6 +2022,14 @@ U8 LLAgent::getRenderState()
 //-----------------------------------------------------------------------------
 void LLAgent::endAnimationUpdateUI()
 {
+	if (LLApp::isExiting()
+		|| !gViewerWindow
+		|| !gMenuBarView
+		|| !gToolBarView
+		|| !gStatusBar)
+	{
+		return;
+	}
 	if (gAgentCamera.getCameraMode() == gAgentCamera.getLastCameraMode())
 	{
 		// We're already done endAnimationUpdateUI for this transition.
-- 
GitLab