avoid initial segfault

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14993 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2009-09-26 05:41:05 +00:00
parent c5862d23ce
commit 023c762c80

View File

@ -1008,7 +1008,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
}
reg:
if ((mwi_account = switch_event_get_header(*v_event, "mwi-account"))) {
if (v_event && *v_event && (mwi_account = switch_event_get_header(*v_event, "mwi-account"))) {
dup_mwi_account = strdup(mwi_account);
switch_assert(dup_mwi_account != NULL);
sofia_glue_get_user_host(dup_mwi_account, &mwi_user, &mwi_host);