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

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

(limited to 'indra/newview/llappviewer.cpp')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 2a928a47a2..b704bf84a1 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();
 	}
-- 
cgit v1.2.3


From 7d7b60a9bec597e2a769ab9e798315194bd6294a Mon Sep 17 00:00:00 2001
From: Mnikolenko Productengine <mnikolenko@productengine.com>
Date: Tue, 22 Oct 2019 17:47:44 +0300
Subject: SL-12168 FIXED crash on exit, if resetting camera was performed

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

(limited to 'indra/newview/llappviewer.cpp')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index b704bf84a1..228dd36e53 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1719,6 +1719,11 @@ bool LLAppViewer::cleanup()
 	disconnectViewer();
 
 	LL_INFOS() << "Viewer disconnected" << LL_ENDL;
+	
+	if (gKeyboard)
+	{
+		gKeyboard->resetKeys();
+	}
 
 	display_cleanup();
 
-- 
cgit v1.2.3


From 0c568bf79934944b3fc1f31476a0b59340d9c360 Mon Sep 17 00:00:00 2001
From: andreykproductengine <andreykproductengine@lindenlab.com>
Date: Wed, 23 Oct 2019 12:22:27 +0300
Subject: SL-12164 crash on userQuit

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

(limited to 'indra/newview/llappviewer.cpp')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 228dd36e53..c9953566fc 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3998,7 +3998,8 @@ void LLAppViewer::userQuit()
 {
 	if (gDisconnected
 		|| !gViewerWindow
-		|| (gViewerWindow->getProgressView() && gViewerWindow->getProgressView()->getVisible()))
+		|| !gViewerWindow->getProgressView()
+		|| gViewerWindow->getProgressView()->getVisible())
 	{
 		requestQuit();
 	}
-- 
cgit v1.2.3


From 1b4d5492c6f4aef54bc51e34c05b270bded584f5 Mon Sep 17 00:00:00 2001
From: andreykproductengine <andreykproductengine@lindenlab.com>
Date: Wed, 23 Oct 2019 16:37:15 +0300
Subject: SL-11727 Fix build warnings

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

(limited to 'indra/newview/llappviewer.cpp')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index c9953566fc..7539d147ae 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1136,7 +1136,7 @@ bool LLAppViewer::init()
 	try {
 		initializeSecHandler();
 	}
-	catch (LLProtectedDataException ex)
+	catch (LLProtectedDataException&)
 	{
 	  LLNotificationsUtil::add("CorruptedProtectedDataStore");
 	}
@@ -1352,7 +1352,7 @@ bool LLAppViewer::frame()
 		{
 			LOG_UNHANDLED_EXCEPTION("");
 		}
-		catch (std::bad_alloc)
+		catch (std::bad_alloc&)
 		{
 			LLMemory::logMemoryInfo(TRUE);
 			LLFloaterMemLeak* mem_leak_instance = LLFloaterReg::findTypedInstance<LLFloaterMemLeak>("mem_leaking");
-- 
cgit v1.2.3


From 5591515f193a1ae3ec0dfcee4020636e529af859 Mon Sep 17 00:00:00 2001
From: andreykproductengine <andreykproductengine@lindenlab.com>
Date: Wed, 23 Oct 2019 20:27:05 +0300
Subject: MAC build fix

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

(limited to 'indra/newview/llappviewer.cpp')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 7539d147ae..d3067456fa 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -61,7 +61,9 @@
 #include "llallocator.h"
 #include "llcalc.h"
 #include "llconversationlog.h"
+#if LL_WINDOWS
 #include "lldxhardware.h"
+#endif
 #include "lltexturestats.h"
 #include "lltrace.h"
 #include "lltracethreadrecorder.h"
-- 
cgit v1.2.3