summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-07-03 14:01:56 +0200
committerBram Moolenaar <Bram@vim.org>2013-07-03 14:01:56 +0200
commit5e6d5ca16c8d35abd28fdeb7f2600ce5e8aeacc1 (patch)
tree052f7ed3298e1bb0bd69ad79ca405623e60fd26d
parente1fc4e2f0f4afbdbff97025dc1e7b68da181d796 (diff)
updated for version 7.3.1292v7.3.1292
Problem: Possibly using invalid pointer when searcing for window. (Raichoo) Solution: Use "firstwin" instead of "tp_firstwin" for current tab.
-rw-r--r--src/version.c2
-rw-r--r--src/window.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/version.c b/src/version.c
index 8c49821877..d661c64363 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1292,
+/**/
1291,
/**/
1290,
diff --git a/src/window.c b/src/window.c
index 54ab200807..2435952e15 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4077,7 +4077,8 @@ win_find_tabpage(win)
tabpage_T *tp;
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
- for (wp = tp->tp_firstwin; wp != NULL; wp = wp->w_next)
+ for (wp = (tp == curtab ? firstwin : tp->tp_firstwin);
+ wp != NULL; wp = wp->w_next)
if (wp == win)
return tp;
return NULL;