Revision
14993
Author
mikej
Date
2009-09-26 00:41:05 -0500 (Sat, 26 Sep 2009)

Log Message

avoid initial segfault

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (14992 => 14993)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	2009-09-26 05:21:41 UTC (rev 14992)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	2009-09-26 05:41:05 UTC (rev 14993)
@@ -1008,7 +1008,7 @@
 	}
   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);