dect
/
asterisk
Archived
13
0
Fork 0

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
This commit is contained in:
file 2008-04-14 15:36:02 +00:00
parent 64cd7ee530
commit 730161f52d
1 changed files with 4 additions and 1 deletions

View File

@ -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);