#4777 Fix crash on missing factory

master
Andrey Kleshchev 2025-10-09 23:59:43 +03:00
parent c15ba8799d
commit 400351f3b8
2 changed files with 11 additions and 0 deletions

View File

@ -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())
{

View File

@ -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;