0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0117: crash when using gettabwinvar() with invalid arguments

Problem:    Crash when using gettabwinvar() with invalid arguments. (Yilin
            Yang)
Solution:   Use "curtab" if "tp" is NULL. (closes #5475)
This commit is contained in:
Bram Moolenaar
2020-01-14 19:05:39 +01:00
parent c10b521628
commit ee93b737aa
3 changed files with 5 additions and 1 deletions

View File

@@ -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