diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-09-09 23:11:49 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-09-09 23:11:49 +0200 |
commit | 3089a1068dd5a0645cea0df09a1c8a1f00146649 (patch) | |
tree | dfa0efabe0060eb2d4e8c73ac528dd154b781664 /src/eval.c | |
parent | 6e932461cb702368d98c846528ee8f30e3a46e27 (diff) |
updated for version 7.4.442v7.4.442
Problem: Using unitinialized variable.
Solution: Pass the first window of the tabpage.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/eval.c b/src/eval.c index 8303bd3759..dfcb586b10 100644 --- a/src/eval.c +++ b/src/eval.c @@ -12071,7 +12071,7 @@ f_gettabvar(argvars, rettv) typval_T *argvars; typval_T *rettv; { - win_T *win, *oldcurwin; + win_T *oldcurwin; tabpage_T *tp, *oldtabpage; dictitem_T *v; char_u *varname; @@ -12084,9 +12084,9 @@ f_gettabvar(argvars, rettv) tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL)); if (tp != NULL && varname != NULL) { - /* Set curwin to be our win, temporarily. Also set the tabpage, - * otherwise the window is not valid. */ - switch_win(&oldcurwin, &oldtabpage, win, tp, TRUE); + /* Set tp to be our tabpage, temporarily. Also set the window to the + * first window in the tabpage, otherwise the window is not valid. */ + switch_win(&oldcurwin, &oldtabpage, tp->tp_firstwin, tp, TRUE); /* look up the variable */ /* Let gettabvar({nr}, "") return the "t:" dictionary. */ |