Author: brian Date: Mon Jun 22 13:37:07 2009 New Revision: 13894 Log: fix segfault on reinvite on nomedia call when using uuid_media Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Mon Jun 22 13:37:07 2009 @@ -1667,14 +1667,16 @@ 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"))) {