diff options
author | Paul ProductEngine <pguslisty@productengine.com> | 2011-07-21 16:58:25 +0300 |
---|---|---|
committer | Paul ProductEngine <pguslisty@productengine.com> | 2011-07-21 16:58:25 +0300 |
commit | 42b75d384f386a71e707e0262c4005036c1d085e (patch) | |
tree | cbdc6cc8475403f80dacff2ec50d39c7c6b7bf2a /indra/newview | |
parent | 4dc0850da7469906e5ad052da71830b05005295b (diff) |
STORM-1458 FIXED [crashhunters] crash at LLParticipantList::LLParticipantListMenu::isGroupModerator() [secondlife-bin llparticipantlist.cpp]
- Added null checking
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llparticipantlist.cpp | 14 |
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; } |