summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-08-04 15:36:26 -0400
committerOz Linden <oz@lindenlab.com>2011-08-04 15:36:26 -0400
commit4ba18501ea2f8c45b2366b6caaeeb7c9ffe6038f (patch)
tree98fc1538be8cb9e87214721d380de531c78c40ef
parent57fec33490140e26298bdcf87e49f9060e586a92 (diff)
parent42b75d384f386a71e707e0262c4005036c1d085e (diff)
merge changes for storm-1458
-rw-r--r--indra/newview/llparticipantlist.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 54053cf89f..fb1153980a 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -798,11 +798,19 @@ void LLParticipantList::LLParticipantListMenu::toggleMuteVoice(const LLSD& userd
bool LLParticipantList::LLParticipantListMenu::isGroupModerator()
{
- // Agent is in Group Call
+ if (!mParent.mSpeakerMgr)
+ {
+ llwarns << "Speaker manager is missing" << llendl;
+ return false;
+ }
+
+ // Is session a group call/chat?
if(gAgent.isInGroup(mParent.mSpeakerMgr->getSessionID()))
{
- // Agent is Moderator
- return mParent.mSpeakerMgr->findSpeaker(gAgentID)->mIsModerator;
+ LLSpeaker* speaker = mParent.mSpeakerMgr->findSpeaker(gAgentID).get();
+
+ // Is agent a moderator?
+ return speaker && speaker->mIsModerator;
}
return false;
}