summaryrefslogtreecommitdiff
path: root/indra/llwebrtc/llwebrtc.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-10-09 23:59:43 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-10-09 23:59:51 +0300
commit400351f3b8354686c58d78a6234e43d2c82ffd22 (patch)
treeaffce697370cff5339beb10a8dfb9ff57c8a14e2 /indra/llwebrtc/llwebrtc.cpp
parentc15ba8799de861f924ef193eb1ead6475efe6548 (diff)
#4777 Fix crash on missing factory
Diffstat (limited to 'indra/llwebrtc/llwebrtc.cpp')
-rw-r--r--indra/llwebrtc/llwebrtc.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index 2cf3f6bbf8..f93ad07c1f 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())
{