commit | 8e639052638a9bb8c7dd6e3e10776b1218cec1a3 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Sun Nov 13 14:31:40 2016 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Sun Nov 13 14:31:40 2016 +0100 |
tree | a964794d08d3ebc1c2b029103ce3c3a2da803cde | |
parent | 3f7d0907269558cb3ea184a3083640f9e20bb21e [diff] [blame] |
patch 8.0.0083 Problem: Using freed memory with win_getid(). (Domenique Pelle) Solution: For the current tab use curwin.
diff --git a/src/window.c b/src/window.c index 8e53368..ee5f7aa 100644 --- a/src/window.c +++ b/src/window.c
@@ -7133,7 +7133,10 @@ 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)