From 023c762c80f574244dea12db97ec8e7e1a134c1f Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sat, 26 Sep 2009 05:41:05 +0000 Subject: [PATCH] avoid initial segfault git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14993 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia_reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index 5ea3f57272..66e5180d66 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -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);