diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-11-13 14:31:40 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-11-13 14:31:40 +0100 |
commit | 8e639052638a9bb8c7dd6e3e10776b1218cec1a3 (patch) | |
tree | a964794d08d3ebc1c2b029103ce3c3a2da803cde /src/window.c | |
parent | 3f7d0907269558cb3ea184a3083640f9e20bb21e (diff) | |
download | vim-git-8e639052638a9bb8c7dd6e3e10776b1218cec1a3.tar.gz |
patch 8.0.0083v8.0.0083
Problem: Using freed memory with win_getid(). (Domenique Pelle)
Solution: For the current tab use curwin.
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c index 8e5336883..ee5f7aa8a 100644 --- a/src/window.c +++ b/src/window.c @@ -7133,7 +7133,10 @@ win_getid(typval_T *argvars) break; if (tp == NULL) return -1; - wp = tp->tp_firstwin; + if (tp == curtab) + wp = firstwin; + else + wp = tp->tp_firstwin; } for ( ; wp != NULL; wp = wp->w_next) if (--winnr == 0) |