diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 93bd72df582eb4ad871eceb3ecb4bb5cc3cab468..9f915fa99364c9da33b158f6ec893e72a0fd5d14 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1366,7 +1366,7 @@ static unsigned int parse_sip_options(struct sip_pvt *pvt, const char *supported unsigned int profile = 0; int i, found; - if (!pvt || ast_strlen_zero(supported) ) + if (ast_strlen_zero(supported) ) return 0; if (option_debug > 2 && sipdebug) @@ -1392,7 +1392,8 @@ static unsigned int parse_sip_options(struct sip_pvt *pvt, const char *supported ast_log(LOG_DEBUG, "Found no match for SIP option: %s (Please file bug report!)\n", next); } - pvt->sipoptions = profile; + if (pvt) + pvt->sipoptions = profile; return profile; }