From 66b8150d4ec94161887cd55d2f5a04e79d1132d7 Mon Sep 17 00:00:00 2001
From: McCabe Maxsted
Date: Mon, 26 Jul 2010 21:38:15 -0700
Subject: Don't cleanup menus on disconnect (#327)

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

(limited to 'linden')

diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 0c643b9..c03c63d 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -3993,9 +3993,8 @@ void LLAppViewer::disconnectViewer()
 			gFloaterView->restoreAll();
 		}
 
-
 		std::list<LLFloater*> floaters_to_close;
-		for(LLView::child_list_const_iter_t it = gFloaterView->getChildList()->begin();
+		for (LLView::child_list_const_iter_t it = gFloaterView->getChildList()->begin();
 			it != gFloaterView->getChildList()->end();
 			++it)
 		{
@@ -4005,7 +4004,7 @@ void LLAppViewer::disconnectViewer()
 			// floater_animation_preview.xml
 			// files.
 			LLFloater* fl = static_cast<LLFloater*>(*it);
-			if(fl 
+			if (fl 
 				&& (fl->getName() == "Image Preview"
 				|| fl->getName() == "Sound Preview"
 				|| fl->getName() == "Animation Preview"
@@ -4042,7 +4041,8 @@ void LLAppViewer::disconnectViewer()
 
 	// close inventory interface, close all windows
 	LLInventoryView::cleanup();
-	cleanup_menus();
+	// Don't cleanup menus on disconnect in order to avoid crashes -- MC
+	//cleanup_menus();
 	// Also writes cached agent settings to gSavedSettings
 	gAgent.cleanup();
 
-- 
cgit v1.1