From 36024cbe2054b9b1433f04628c5dbcba4641705c Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 12 Feb 2026 07:37:17 -0400 Subject: [PATCH] MT#55283 fix handing of sub-ans with extra media Closes #2066 Change-Id: I35761075c28be3ddf1476d46b3bb8621ae899b40 (cherry picked from commit e015250b96bb476f6e60d91f6512a6fef5c50db6) --- daemon/call.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index 9d2e5cb9b..b7e997602 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -3535,8 +3535,8 @@ int monologue_subscribe_answer(struct call_monologue *dst_ml, sdp_ng_flags *flag for (__auto_type l = streams->head; l; l = l->next) { - struct stream_params * sp = l->data; - struct call_media * dst_media = __get_media(dst_ml, sp, flags, 0, mid_tracker); + struct stream_params *sp = l->data; + struct call_media *dst_media = __get_media(dst_ml, sp, flags, 0, mid_tracker); if (!dst_media) continue; @@ -3545,8 +3545,12 @@ int monologue_subscribe_answer(struct call_monologue *dst_ml, sdp_ng_flags *flag * TODO: this should probably be reworked to support one-to-multi subscriptions. */ __auto_type src_ml_media_it = dst_media->media_subscriptions.head; - struct media_subscription * ms = src_ml_media_it->data; - struct call_media * src_media = ms->media; + if (!src_ml_media_it) + continue; + struct media_subscription *ms = src_ml_media_it->data; + if (!ms) + continue; + struct call_media *src_media = ms->media; if (!src_media) continue;