From: Mark Michelson Date: Fri, 9 Apr 2010 21:41:30 +0000 (+0000) Subject: Prevent crash when originating a call to a local channel. X-Git-Tag: 11.0.0-beta1~3185 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7509949658486290e77c5ba80627dd9f48b3315c;p=thirdparty%2Fasterisk.git Prevent crash when originating a call to a local channel. Call completion code tries to grab the call completion parameters from the requesting channel during local_request. When originating a call to a local channel, however, this channel is NULL. This was causing an issue for me when trying to run a test script. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256646 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_local.c b/channels/chan_local.c index b8052b0fd5..7a9bda3569 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -869,7 +869,7 @@ static struct ast_channel *local_request(const char *type, format_t format, cons AST_LIST_UNLOCK(&locals); p = local_pvt_destroy(p); } - if (ast_channel_cc_params_init(chan, ast_channel_get_cc_config_params((struct ast_channel *)requestor))) { + if (ast_channel_cc_params_init(chan, requestor ? ast_channel_get_cc_config_params((struct ast_channel *)requestor) : NULL)) { chan = ast_channel_release(chan); p = local_pvt_destroy(p); }