patch 9.0.0824: crash when using win_move_separator() in other tab page
Problem: Crash when using win_move_separator() in other tab page.
Solution: Check for valid window in current tab page.
(closes #11479, closes #11427)
diff --git a/src/evalwindow.c b/src/evalwindow.c
index 98c7ff3..bc59251 100644
--- a/src/evalwindow.c
+++ b/src/evalwindow.c
@@ -889,6 +889,11 @@
wp = find_win_by_nr_or_id(&argvars[0]);
if (wp == NULL || win_valid_popup(wp))
return;
+ if (!win_valid(wp))
+ {
+ emsg(_(e_cannot_resize_window_in_another_tab_page));
+ return;
+ }
offset = (int)tv_get_number(&argvars[1]);
win_drag_vsep_line(wp, offset);