summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorBJ Weschke <bweschke@btwtech.com>2006-02-03 22:38:38 +0000
committerBJ Weschke <bweschke@btwtech.com>2006-02-03 22:38:38 +0000
commit81125d803e49e728520f2c19b6665ae9272c3314 (patch)
treea2e437a50ee4a84de114ca70a7611c82d471b1fd /channels
parent34bcd0e0b65aef5a30b1b87a1e934a22757f1e5a (diff)
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
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_local.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c
index bff3ab54d..57719eb2b 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;