From 242c39f24bc38ee306f1a9b4a173fd095fdab49d Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Fri, 15 Mar 2013 17:54:16 -0700
Subject: CHUI-807 : More defensive code. Don't assume anything while iterating
 through panels.

---
 indra/newview/llimview.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index cd47a0c171..fbb3bd4a8e 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -641,8 +641,7 @@ void LLIMModel::LLIMSession::loadHistory()
 
 LLIMModel::LLIMSession* LLIMModel::findIMSession(const LLUUID& session_id) const
 {
-	return get_if_there(mId2SessionMap, session_id,
-		(LLIMModel::LLIMSession*) NULL);
+	return get_if_there(mId2SessionMap, session_id, (LLIMModel::LLIMSession*) NULL);
 }
 
 //*TODO consider switching to using std::set instead of std::list for holding LLUUIDs across the whole code
@@ -2809,7 +2808,7 @@ LLUUID LLIMMgr::addSession(
 		}
 	}
 
-	bool new_session = !LLIMModel::getInstance()->findIMSession(session_id);
+	bool new_session = (LLIMModel::getInstance()->findIMSession(session_id) == NULL);
 
 	//works only for outgoing ad-hoc sessions
 	if (new_session && IM_SESSION_CONFERENCE_START == dialog && ids.size())
-- 
cgit v1.2.3