From d345153bfe6065efc990d829722de55d45a551d8 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 14 Dec 2009 10:38:16 +0200 Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and text) to the Voice Control Panel (Active Speakers List)) -- Fixed crash if press Call button quickly in just opened IM Group floater Reason: voice channel is in STATE_NO_CHANNEL_INFO, in this case there are no any speakers yet. Fix: added NULL validating of finding speaker before determining if Agent is a moderator. --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'indra/newview/llcallfloater.cpp') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 75fc9f1f7b..785591e7e3 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -351,11 +351,17 @@ void LLCallFloater::updateModeratorState() if(gAgent.isInGroup(mSpeakerManager->getSessionID())) { - // Agent is Moderator - if (mSpeakerManager->findSpeaker(gAgentID)->mIsModerator) + // This method can be called when LLVoiceChannel.mState == STATE_NO_CHANNEL_INFO + // in this case there are no any speakers yet. + if (mSpeakerManager->findSpeaker(gAgentID)) { - const std::string moderator_indicator(LLTrans::getString("IM_moderator_label")); - name += " " + moderator_indicator; + // Agent is Moderator + if (mSpeakerManager->findSpeaker(gAgentID)->mIsModerator) + + { + const std::string moderator_indicator(LLTrans::getString("IM_moderator_label")); + name += " " + moderator_indicator; + } } } mAgentPanel->childSetValue("user_text", name); -- cgit v1.2.3