diff options
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 15b67b905d..7007c58b3c 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -101,7 +101,7 @@ LLFloaterIMContainer::~LLFloaterIMContainer() gSavedPerAccountSettings.setBOOL("ConversationsMessagePaneCollapsed", mMessagesPane->isCollapsed()); gSavedPerAccountSettings.setBOOL("ConversationsParticipantListCollapsed", !isParticipantListExpanded()); - if (!LLSingleton<LLIMMgr>::destroyed()) + if (LLIMMgr::instanceExists()) { LLIMMgr::getInstance()->removeSessionObserver(this); } @@ -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; |