]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 229015 via svnmerge from
authorTerry Wilson <twilson@digium.com>
Mon, 9 Nov 2009 22:52:43 +0000 (22:52 +0000)
committerTerry Wilson <twilson@digium.com>
Mon, 9 Nov 2009 22:52:43 +0000 (22:52 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r229015 | twilson | 2009-11-09 16:50:22 -0600 (Mon, 09 Nov 2009) | 8 lines

  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/branches/1.6.1@229016 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_local.c

index 141f89f5b73c2961944ef65e3215f09007d919b0..b47b9a84a54e6892513165c6cacec74441a339c3 100644 (file)
@@ -177,6 +177,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)) {