protect against null deref.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6894 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-12-19 03:34:37 +00:00
parent d5679e0534
commit 4cfb893c9c
1 changed files with 5 additions and 1 deletions

View File

@ -1807,7 +1807,11 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;
uint32_t timeout = 60;
char *tuuid_str;
const char *port = refer_to->r_url->url_port;
const char *port = NULL;
if (refer_to && refer_to->r_url && refer_to->r_url->url_port) {
port = refer_to->r_url->url_port;
}
if (switch_strlen_zero(port)) {
port = "5060";