diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-01-14 19:05:39 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-01-14 19:05:39 +0100 |
commit | ee93b737aaa7bf65edc7281f429dd89fcf657a6f (patch) | |
tree | 9d9019b603e4d2e09baf7e3816c771dd66d70b4a /src/evalwindow.c | |
parent | c10b521628f2b073fa231defa26f23937c91724d (diff) | |
download | vim-git-ee93b737aaa7bf65edc7281f429dd89fcf657a6f.tar.gz |
patch 8.2.0117: crash when using gettabwinvar() with invalid argumentsv8.2.0117
Problem: Crash when using gettabwinvar() with invalid arguments. (Yilin
Yang)
Solution: Use "curtab" if "tp" is NULL. (closes #5475)
Diffstat (limited to 'src/evalwindow.c')
-rw-r--r-- | src/evalwindow.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/evalwindow.c b/src/evalwindow.c index 672bfc13c..fb54033e5 100644 --- a/src/evalwindow.c +++ b/src/evalwindow.c @@ -183,7 +183,8 @@ find_win_by_nr( { #ifdef FEAT_PROP_POPUP // check tab-local popup windows - for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next) + for (wp = (tp == NULL ? curtab : tp)->tp_first_popupwin; + wp != NULL; wp = wp->w_next) if (wp->w_id == nr) return wp; // check global popup windows |