diff options
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 34d202e0ad..672bfc13c9 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; |