diff options
author | Terry Wilson <twilson@digium.com> | 2009-11-09 22:50:22 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2009-11-09 22:50:22 +0000 |
commit | d6b5df8715043af115c815462478deecdcf39f3a (patch) | |
tree | 2a68a05e756cd0f196376104c9cbfebb3341e22d /channels/chan_local.c | |
parent | 182ac0c503a2fb00c7ce22c9e61ffe3de4eaa11d (diff) |
Don't crash when bridge->tech_pvt == NULL
This is a similar solution to what is in place for chan_agent
(closes issue #16003)
Reported by: atis
Tested by: twilson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@229015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_local.c')
-rw-r--r-- | channels/chan_local.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index f26084b49..453375319 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -183,6 +183,12 @@ static struct ast_channel *local_bridgedchannel(struct ast_channel *chan, struct struct local_pvt *p = bridge->tech_pvt; struct ast_channel *bridged = bridge; + if (!p) { + ast_debug(1, "Asked for bridged channel on '%s'/'%s', returning <none>\n", + chan->name, bridge->name); + return NULL; + } + ast_mutex_lock(&p->lock); if (ast_test_flag(p, LOCAL_BRIDGE)) { |