From 5f89fe0b617d5df6d22b58ae7818b80c0eddcf7d Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Mon, 25 Mar 2013 23:01:36 -0700
Subject: [PATCH] CHUI-892 : Fixed. restoreFloater() called when floater docked

---
 indra/newview/llfloaterimcontainer.cpp  | 5 ++++-
 indra/newview/llfloaterimsessiontab.cpp | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 0cda1f79b34..7296ec3ceda 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1337,7 +1337,10 @@ void LLFloaterIMContainer::showConversation(const LLUUID& session_id)
     selectConversationPair(session_id, true);
 
     LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id);
-    session_floater->restoreFloater();
+    if (session_floater)
+    {
+        session_floater->restoreFloater();
+    }
 }
 
 void LLFloaterIMContainer::clearAllFlashStates()
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 0333bacd589..d15c73a4a3a 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -874,7 +874,7 @@ void LLFloaterIMSessionTab::reshapeFloater(bool collapse)
 
 void LLFloaterIMSessionTab::restoreFloater()
 {
-	if(!isMessagePaneExpanded())
+	if(checkIfTornOff() && !isMessagePaneExpanded())
 	{
 		if(isMinimized())
 		{
-- 
GitLab