From 7b74ee3955260aa83e554c2e173c59864d37f3f7 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 3 Jun 2014 05:26:24 +0500 Subject: [PATCH] fix regression from regression --- src/mod/endpoints/mod_sofia/sofia.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 2602cd57d2..a7ba0f036a 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -5787,11 +5787,13 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status, } } - if (tech_pvt && (status > 100 || switch_channel_test_flag(channel, CF_ANSWERED)) && status < 300 && !r_sdp && tech_pvt->last_sdp_str) { - r_sdp = tech_pvt->last_sdp_str; - } + if (tech_pvt) { + if ((status > 100 || switch_channel_test_flag(channel, CF_ANSWERED)) && status < 300 && !r_sdp && tech_pvt->last_sdp_str) { + r_sdp = tech_pvt->last_sdp_str; + } - tech_pvt->last_sdp_str = NULL; + tech_pvt->last_sdp_str = NULL; + } if ((channel && (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA))) || (sofia_test_flag(profile, TFLAG_INB_NOMEDIA) || sofia_test_flag(profile, TFLAG_PROXY_MEDIA))) {