]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix segfault on reinvite on nomedia call when using uuid_media
authorBrian West <brian@freeswitch.org>
Mon, 22 Jun 2009 18:37:07 +0000 (18:37 +0000)
committerBrian West <brian@freeswitch.org>
Mon, 22 Jun 2009 18:37:07 +0000 (18:37 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13894 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_glue.c

index 69460d4f9535a4004a9ee45e0a9f2b7136840e65..c332c2a92977bee139b9219906de8b49c1711fc0 100644 (file)
@@ -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"))) {