aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-27 16:15:47 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-27 16:15:47 +0000
commitb60478b022363bb8e3e301688b31c402e5eb7ff9 (patch)
treec83884702d3396282cde94f0843e260ceb2ba964
parent2ffec7779d19571cfef9008b14e6859c4834e548 (diff)
Merged revisions 62171 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r62171 | russell | 2007-04-27 11:14:11 -0500 (Fri, 27 Apr 2007) | 6 lines If no variables were passed into pbx_substitute_variables_helper_full(), then don't even bother creating a temporary bogus channel, since that is only for allowing certain functions to operate on the variables as if they were on a channel. Most importantly, this fixes a crash. (issue #9613, reported by callguy, fixed by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@62172 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/pbx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 0e4464a63..5f3f77b16 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -1564,7 +1564,7 @@ static void pbx_substitute_variables_helper_full(struct ast_channel *c, struct v
parse_variable_name(vars, &offset, &offset2, &isfunction);
if (isfunction) {
/* Evaluate function */
- if (c)
+ if (c || !headp)
cp4 = ast_func_read(c, vars, workspace, VAR_BUF_SIZE) ? NULL : workspace;
else {
struct varshead old;