summaryrefslogtreecommitdiff
path: root/apps/app_while.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_while.c')
-rw-r--r--apps/app_while.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_while.c b/apps/app_while.c
index 33f9bbb51..8595916f3 100644
--- a/apps/app_while.c
+++ b/apps/app_while.c
@@ -231,8 +231,8 @@ static int _while_exec(struct ast_channel *chan, void *data, int end)
pbx_builtin_setvar_helper(chan, my_name, NULL);
snprintf(end_varname,VAR_SIZE,"END_%s",varname);
if ((goto_str=pbx_builtin_getvar_helper(chan, end_varname))) {
- pbx_builtin_setvar_helper(chan, end_varname, NULL);
ast_parseable_goto(chan, goto_str);
+ pbx_builtin_setvar_helper(chan, end_varname, NULL);
} else {
int pri = find_matching_endwhile(chan);
if (pri > 0) {