aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-15 06:37:51 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-15 06:37:51 +0000
commit72c0d7f897afc6609202be5770dde817e88a3cb3 (patch)
tree0887e771a85769ef6fa72b13e181748739f6ae88 /channel.c
parente22e0ead4a8822bda185ea7c36d3d843ce8a9c47 (diff)
Handle masq properly when clone channel has no vars (bug 3344)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4796 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rwxr-xr-xchannel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channel.c b/channel.c
index 24a935151..0d1c5da06 100755
--- a/channel.c
+++ b/channel.c
@@ -2317,7 +2317,8 @@ static void clone_variables(struct ast_channel *original, struct ast_channel *cl
/* Append variables from clone channel into original channel */
/* XXX Is this always correct? We have to in order to keep MACROS working XXX */
- AST_LIST_INSERT_TAIL(&original->varshead, AST_LIST_FIRST(&clone->varshead), entries);
+ if (AST_LIST_FIRST(&clone->varshead))
+ AST_LIST_INSERT_TAIL(&original->varshead, AST_LIST_FIRST(&clone->varshead), entries);
}
/* Assumes channel will be locked when called */