aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
Diffstat (limited to 'channels')
-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);