From 5ae00a58b341686d4913f5458dacf07fe83ad808 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Mon, 1 Oct 2007 15:57:04 +0000 Subject: [PATCH] Check to make sure a structure pointer is non-NULL before touching it... crashing is bad, mmmk? (closes issue #10831) Reported by: eliel Patches: chan_sip.c.patch uploaded by eliel (license 64) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84176 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index c671b62bd2..2bd516b8d7 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -18912,7 +18912,7 @@ static char *sip_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a ast_verbose("Previous SIP reload not yet done\n"); else { sip_reloading = TRUE; - sip_reloadreason = a->fd ? CHANNEL_CLI_RELOAD : CHANNEL_MODULE_RELOAD; + sip_reloadreason = (a && a->fd) ? CHANNEL_CLI_RELOAD : CHANNEL_MODULE_RELOAD; } ast_mutex_unlock(&sip_reload_lock); restart_monitor();