From b4ee80b91bfa1bdc427aaf5f5821e2a5590e21f4 Mon Sep 17 00:00:00 2001
From: AndreyL ProductEngine <alihatskiy@productengine.com>
Date: Tue, 23 Aug 2016 17:58:36 +0300
Subject: [PATCH] MAINT-6511 Crash in LLFloaterView::restoreAll - exception
 handling

---
 indra/llui/llfloater.cpp | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 1f9869fadc4..b3048a9b161 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -2320,7 +2320,17 @@ void LLFloaterView::restoreAll()
 	// make sure all subwindows aren't minimized
 	for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
 	{
-		LLFloater* floaterp = dynamic_cast<LLFloater*>(*child_it);
+		LLFloater* floaterp = nullptr;
+		try
+		{
+			floaterp = dynamic_cast<LLFloater*>(*child_it);
+		}
+		catch (std::exception e) // See MAINT-6511
+		{
+			LL_WARNS() << "Caught exception: " << e.what() << LL_ENDL;
+			continue;
+		}
+
 		if (floaterp)
 		{
 			floaterp->setMinimized(FALSE);
-- 
GitLab