aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_local.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-09 21:41:30 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-09 21:41:30 +0000
commit77c798dc69ed916c914f18c2f7e8ce77f7ffb379 (patch)
treece17b77ffe24df730b80abeb57812e43a75c565d /channels/chan_local.c
parent3ed29ebf5c29fe0b931c0b9e07a538ad8e49651a (diff)
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: http://svn.digium.com/svn/asterisk/trunk@256646 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_local.c')
-rw-r--r--channels/chan_local.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c
index b8052b0fd..7a9bda356 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);
}