summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-03-27 20:47:10 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-03-27 21:29:31 +0200
commit6ac1d4f3e37f2118875a4c9e96b26e3f82e17a1e (patch)
tree2926d2a4b346aa32a684c9ced19a4016497df1a9 /indra
parent2b44a97a16dcf5f2a3356f1a4ccf29a47bbe9c87 (diff)
#3829 WebRTC crash OnDataReceivedImpl
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvoicewebrtc.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 93c217a7ba..08fcec86ac 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -3024,7 +3024,7 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b
{
root["ug"] = user_gain;
}
- if (root.size() > 0)
+ if (root.size() > 0 && mWebRTCDataInterface)
{
std::string json_data = boost::json::serialize(root);
mWebRTCDataInterface->sendData(json_data, false);
@@ -3067,7 +3067,10 @@ void LLVoiceWebRTCConnection::OnDataChannelReady(llwebrtc::LLWebRTCDataInterface
void LLVoiceWebRTCConnection::sendJoin()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
-
+ if (!mWebRTCDataInterface)
+ {
+ return;
+ }
boost::json::object root;
boost::json::object join_obj;