From: BJ Weschke Date: Fri, 3 Feb 2006 22:38:38 +0000 (+0000) Subject: Don't set a global variable if the channel you're trying to set CHANLOCALSTATUS... X-Git-Tag: 1.4.0-beta1~2719 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81125d803e49e728520f2c19b6665ae9272c3314;p=thirdparty%2Fasterisk.git Don't set a global variable if the channel you're trying to set CHANLOCALSTATUS on has gone away already. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9139 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_local.c b/channels/chan_local.c index bff3ab54dd..57719eb2b6 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -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;