summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2024-07-22 11:02:09 -0400
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-08-09 22:55:08 +0300
commitac75cd98fc526f2f2945093b611ee6e321ceecfa (patch)
tree314494493088337173479b9405810e6ea836c6b6 /indra
parentcd188352700fd4d3b686c25f2307f4bd9179132f (diff)
Fix null region pointer crash in LLIMView
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llimview.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 05b1fec8e5..8a428c45d0 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -3040,13 +3040,16 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload
gIMMgr->addSession(correct_session_name, type, session_id, payload["voice_channel_info"]);
- std::string url = gAgent.getRegion()->getCapability(
+ std::string url = gAgent.getRegionCapability(
"ChatSessionRequest");
if (voice)
{
- LLCoros::instance().launch("chatterBoxInvitationCoro",
- boost::bind(&chatterBoxInvitationCoro, url, session_id, inv_type, payload["voice_channel_info"]));
+ if(!url.empty())
+ {
+ LLCoros::instance().launch("chatterBoxInvitationCoro",
+ boost::bind(&chatterBoxInvitationCoro, url, session_id, inv_type, payload["voice_channel_info"]));
+ }
// send notification message to the corresponding chat
if (payload["notify_box_type"].asString() == "VoiceInviteGroup" || payload["notify_box_type"].asString() == "VoiceInviteAdHoc")
@@ -4061,9 +4064,12 @@ public:
// Send request for chat history, if enabled.
if (gSavedPerAccountSettings.getBOOL("FetchGroupChatHistory"))
{
- std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
- LLCoros::instance().launch("chatterBoxHistoryCoro",
- boost::bind(&chatterBoxHistoryCoro, url, session_id, "", "", 0));
+ std::string url = gAgent.getRegionCapability("ChatSessionRequest");
+ if (!url.empty())
+ {
+ LLCoros::instance().launch("chatterBoxHistoryCoro",
+ boost::bind(&chatterBoxHistoryCoro, url, session_id, "", "", 0));
+ }
}
}
}