From 42b75d384f386a71e707e0262c4005036c1d085e Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Thu, 21 Jul 2011 16:58:25 +0300 Subject: STORM-1458 FIXED [crashhunters] crash at LLParticipantList::LLParticipantListMenu::isGroupModerator() [secondlife-bin llparticipantlist.cpp] - Added null checking --- indra/newview/llparticipantlist.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'indra/newview/llparticipantlist.cpp') 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; } -- cgit v1.2.3