aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_local.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-14 15:36:02 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-14 15:36:02 +0000
commit730161f52d94207e2a0327b6960fdde712f8bc82 (patch)
tree8f1a5acffdca0a994f46937e1e2661b81deac8fc /channels/chan_local.c
parent64cd7ee530ed518a779043da1497f49806d9f62f (diff)
During hangup it is possible for p->chan or p->owner to be NULL, so just return what the channel is bridged to instead of what they are *really* bridged to. Thanks Matt Nicholson!
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114109 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_local.c')
-rw-r--r--channels/chan_local.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c
index e79c82184..d371a0f75 100644
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -183,8 +183,11 @@ static struct ast_channel *local_bridgedchannel(struct ast_channel *chan, struct
bridged = (bridge == p->owner ? p->chan : p->owner);
/* Now see if the opposite channel is bridged to anything */
- if (bridged->_bridge)
+ if (!bridged) {
+ bridged = bridge;
+ } else if (bridged->_bridge) {
bridged = bridged->_bridge;
+ }
}
ast_mutex_unlock(&p->lock);