mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
sipcall: check media_tr
avoid segfault. Backtrace from the play store Change-Id: I5a44a5ee190cba22ed31ef4c7f64703b352db7fe
This commit is contained in:
@ -1034,9 +1034,13 @@ SIPCall::setupLocalSDPFromIce()
|
||||
std::vector<IceCandidate>
|
||||
SIPCall::getAllRemoteCandidates()
|
||||
{
|
||||
std::vector<IceCandidate> rem_candidates;
|
||||
auto media_tr = getIceMediaTransport();
|
||||
|
||||
if (not media_tr) {
|
||||
JAMI_WARN("[call:%s] no media ICE transport", getCallId().c_str());
|
||||
return {};
|
||||
}
|
||||
|
||||
auto addSDPCandidates = [&, this](unsigned sdpMediaId, std::vector<IceCandidate>& out) {
|
||||
IceCandidate cand;
|
||||
for (auto& line : sdp_->getIceCandidates(sdpMediaId)) {
|
||||
@ -1049,6 +1053,7 @@ SIPCall::getAllRemoteCandidates()
|
||||
}
|
||||
};
|
||||
|
||||
std::vector<IceCandidate> rem_candidates;
|
||||
addSDPCandidates(SDP_AUDIO_MEDIA_ID, rem_candidates);
|
||||
#ifdef ENABLE_VIDEO
|
||||
addSDPCandidates(SDP_VIDEO_MEDIA_ID, rem_candidates);
|
||||
|
Reference in New Issue
Block a user