summaryrefslogtreecommitdiff
path: root/src/evalwindow.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-06 21:03:24 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-06 21:03:24 +0100
commit7b94e77132eabdf0e43abca57e2ffeb961545174 (patch)
tree61c26382aba1bb738c2a88a08345b6bcd009a097 /src/evalwindow.c
parenta1353b5352f0797fc651a0dd363876f1c2fa60c5 (diff)
downloadvim-git-7b94e77132eabdf0e43abca57e2ffeb961545174.tar.gz
patch 8.2.0093: win_splitmove() can make Vim hangv8.2.0093
Problem: win_splitmove() can make Vim hang. Solution: Check windows exists in the current tab page. (closes #5444)
Diffstat (limited to 'src/evalwindow.c')
-rw-r--r--src/evalwindow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/evalwindow.c b/src/evalwindow.c
index 34d202e0a..672bfc13c 100644
--- a/src/evalwindow.c
+++ b/src/evalwindow.c
@@ -808,7 +808,8 @@ f_win_splitmove(typval_T *argvars, typval_T *rettv)
wp = find_win_by_nr_or_id(&argvars[0]);
targetwin = find_win_by_nr_or_id(&argvars[1]);
- if (wp == NULL || targetwin == NULL || wp == targetwin)
+ if (wp == NULL || targetwin == NULL || wp == targetwin
+ || !win_valid(wp) || !win_valid(targetwin))
{
emsg(_(e_invalwindow));
rettv->vval.v_number = -1;