From f9cafeb7a8773f70663598e159fa5d1dfbe479c0 Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Tue, 25 Feb 2020 01:36:51 +0400 Subject: [PATCH] [Core] Fix crash when parsing some uncommon SDP attributes --- src/switch_core_media.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/switch_core_media.c b/src/switch_core_media.c index c3a29353ee..14a38797b6 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -5977,7 +5977,9 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s } } - t_engine->cur_payload_map = red_pmap; + if (red_pmap) { + t_engine->cur_payload_map = red_pmap; + } for (attr = m->m_attributes; attr; attr = attr->a_next) { if (!strcasecmp(attr->a_name, "rtcp") && attr->a_value) {