From 92d84a9c365756eeaf7234af42e53f09866263a0 Mon Sep 17 00:00:00 2001
From: Mnikolenko Productengine <mnikolenko@productengine.com>
Date: Tue, 27 Dec 2016 12:04:51 +0200
Subject: [PATCH] MAINT-7022 Crash in
 LLFloaterIMContainer::visibleContextMenuItem()

---
 indra/newview/llfloaterimcontainer.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 7039e48e74a..7007c58b3c8 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1505,15 +1505,21 @@ bool LLFloaterIMContainer::checkContextMenuItem(const std::string& item, uuid_ve
 
 bool LLFloaterIMContainer::visibleContextMenuItem(const LLSD& userdata)
 {
+	const LLConversationItem *conversation_item = getCurSelectedViewModelItem();
+	if(!conversation_item)
+	{
+		return false;
+	}
+
 	const std::string& item = userdata.asString();
 
 	if ("show_mute" == item)
 	{
-		return !isMuted(getCurSelectedViewModelItem()->getUUID());
+		return !isMuted(conversation_item->getUUID());
 	}
 	else if ("show_unmute" == item)
 	{
-		return isMuted(getCurSelectedViewModelItem()->getUUID());
+		return isMuted(conversation_item->getUUID());
 	}
 
 	return true;
-- 
GitLab