From: Brian West Date: Mon, 22 Jun 2009 18:37:07 +0000 (+0000) Subject: fix segfault on reinvite on nomedia call when using uuid_media X-Git-Tag: v1.0.4~387 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f618475c67be62151096f017460bb72cfb159254;p=thirdparty%2Ffreeswitch.git fix segfault on reinvite on nomedia call when using uuid_media git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13894 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index 69460d4f95..c332c2a929 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -1667,14 +1667,16 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session) sofia_glue_tech_patch_sdp(tech_pvt); } - dst = sofia_glue_get_destination(tech_pvt->dest); + if (!switch_strlen_zero(tech_pvt->dest)) { + dst = sofia_glue_get_destination(tech_pvt->dest); - if (dst->route_uri) { - route_uri = sofia_overcome_sip_uri_weakness(tech_pvt->session, dst->route_uri, 0, SWITCH_TRUE, NULL); - } + if (dst->route_uri) { + route_uri = sofia_overcome_sip_uri_weakness(tech_pvt->session, dst->route_uri, 0, SWITCH_TRUE, NULL); + } - if (dst->route) { - route = dst->route; + if (dst->route) { + route = dst->route; + } } if ((val = switch_channel_get_variable(channel, "sip_route_uri"))) {