From 400351f3b8354686c58d78a6234e43d2c82ffd22 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Thu, 9 Oct 2025 23:59:43 +0300 Subject: [PATCH] #4777 Fix crash on missing factory --- indra/llwebrtc/llwebrtc.cpp | 7 +++++++ indra/newview/llimview.cpp | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index 2cf3f6bbf88..f93ad07c1f4 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -914,6 +914,13 @@ bool LLWebRTCPeerConnectionImpl::initializeConnection(const LLWebRTCPeerConnecti config.set_max_port(60100); webrtc::PeerConnectionDependencies pc_dependencies(this); + if (mPeerConnectionFactory == nullptr) + { + RTC_LOG(LS_ERROR) << __FUNCTION__ << "Error creating peer connection, factory doesn't exist"; + // Too early? + mPendingJobs--; + return; + } auto error_or_peer_connection = mPeerConnectionFactory->CreatePeerConnectionOrError(config, std::move(pc_dependencies)); if (error_or_peer_connection.ok()) { diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index c1e80ba4f12..bda4afcc04b 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -809,6 +809,10 @@ void LLIMModel::LLIMSession::initVoiceChannel(const LLSD& voiceChannelInfo) { if (mVoiceChannel) { + if (!voiceChannelInfo.isMap()) + { + LL_WARNS() << "initVoiceChannel called without voiceChannelInfo" << LL_ENDL; + } if (mVoiceChannel->isThisVoiceChannel(voiceChannelInfo)) { return;