summaryrefslogtreecommitdiff
path: root/indra/newview/llimpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llimpanel.cpp')
-rw-r--r--indra/newview/llimpanel.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index 4435bba0ed..99f331d087 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -1162,8 +1162,12 @@ void LLFloaterIMPanel::draw()
childSetEnabled("start_call_btn", enable_connect);
childSetEnabled("send_btn", !childGetValue("chat_editor").asString().empty());
+ LLPointer<LLSpeaker> self_speaker;
LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionUUID);
- LLPointer<LLSpeaker> self_speaker = speaker_mgr->findSpeaker(gAgent.getID());
+ if (speaker_mgr)
+ {
+ self_speaker = speaker_mgr->findSpeaker(gAgent.getID());
+ }
if(!mTextIMPossible)
{
mInputEditor->setEnabled(FALSE);
@@ -1751,8 +1755,9 @@ void LLFloaterIMPanel::setTyping(BOOL typing)
// Will send typing state after a short delay.
mSentTypingState = FALSE;
}
-
- speaker_mgr->setSpeakerTyping(gAgent.getID(), TRUE);
+
+ if (speaker_mgr)
+ speaker_mgr->setSpeakerTyping(gAgent.getID(), TRUE);
}
else
{
@@ -1762,7 +1767,8 @@ void LLFloaterIMPanel::setTyping(BOOL typing)
sendTypingState(FALSE);
mSentTypingState = TRUE;
}
- speaker_mgr->setSpeakerTyping(gAgent.getID(), FALSE);
+ if (speaker_mgr)
+ speaker_mgr->setSpeakerTyping(gAgent.getID(), FALSE);
}
mTyping = typing;
@@ -1822,7 +1828,11 @@ void LLFloaterIMPanel::removeTypingIndicator(const LLIMInfo* im_info)
mHistoryEditor->removeTextFromEnd(chars_to_remove);
if (im_info)
{
- LLIMModel::getInstance()->getSpeakerManager(mSessionUUID)->setSpeakerTyping(im_info->mFromID, FALSE);
+ LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionUUID);
+ if (speaker_mgr)
+ {
+ speaker_mgr->setSpeakerTyping(im_info->mFromID, FALSE);
+ }
}
}
}