summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2009-12-14 10:38:16 +0200
committerMike Antipov <mantipov@productengine.com>2009-12-14 10:38:16 +0200
commitd345153bfe6065efc990d829722de55d45a551d8 (patch)
treebb66b9e6a3221cb723e261609875125f06cdd403 /indra/newview
parent612c7a2960492a7838b55dd3706a3ddcec0d0c30 (diff)
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
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llcallfloater.cpp14
1 files changed, 10 insertions, 4 deletions
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);