jamiaccount: fix crash when calling without a connection

This commit places a null check for the connectionManager before getting
the ice options in the `newOutgoingCall` method, which fixes a crash
when calling without a connection.

Gitlab: #1129
Change-Id: Ia6872f6fb9830e72da1d87201e2a0890719a8db9
This commit is contained in:
Andreas Traczyk
2025-05-26 18:14:49 -04:00
parent a48c353f6c
commit 5645210a2d

View File

@ -354,6 +354,10 @@ JamiAccount::newOutgoingCall(std::string_view toUrl, const std::vector<libjami::
if (not call)
return {};
std::shared_lock lkCM(connManagerMtx_);
if (!connectionManager_)
return {};
connectionManager_->getIceOptions([call, w = weak(), uri = std::move(uri)](auto&& opts) {
if (call->isIceEnabled()) {
if (not call->createIceMediaTransport(false)