Don't set a global variable if the channel you're trying to set CHANLOCALSTATUS...
authorBJ Weschke <bweschke@btwtech.com>
Fri, 3 Feb 2006 22:38:38 +0000 (22:38 +0000)
committerBJ Weschke <bweschke@btwtech.com>
Fri, 3 Feb 2006 22:38:38 +0000 (22:38 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9139 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_local.c

index bff3ab5..57719eb 100644 (file)
@@ -394,7 +394,7 @@ static int local_hangup(struct ast_channel *ast)
        isoutbound = IS_OUTBOUND(ast, p);
        if (isoutbound) {
                status = pbx_builtin_getvar_helper(p->chan, "DIALSTATUS");
-               if(status)
+               if ((status) && (p->owner))
                        pbx_builtin_setvar_helper(p->owner, "CHANLOCALSTATUS", status);
                p->chan = NULL;
                p->launchedpbx = 0;