From cc32c70518d39e10ca365e384ade1aa17595d5e3 Mon Sep 17 00:00:00 2001
From: andreykproductengine <andreykproductengine@lindenlab.com>
Date: Mon, 21 Oct 2019 21:45:45 +0300
Subject: [PATCH] SL-12164 attempt to close viewer on window init resulted in
 crash

---
 indra/newview/llappviewer.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 2a928a47a23..b704bf84a1a 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3991,7 +3991,9 @@ static LLNotificationFunctorRegistration finish_quit_reg("ConfirmQuit", finish_q
 
 void LLAppViewer::userQuit()
 {
-	if (gDisconnected || gViewerWindow->getProgressView()->getVisible())
+	if (gDisconnected
+		|| !gViewerWindow
+		|| (gViewerWindow->getProgressView() && gViewerWindow->getProgressView()->getVisible()))
 	{
 		requestQuit();
 	}
-- 
GitLab