patch 8.2.1939: invalid memory access in Ex mode with global command

Problem:    Invalid memory access in Ex mode with global command.
Solution:   Make sure the cursor is on a valid line. (closes #7238)
diff --git a/src/move.c b/src/move.c
index 20a34e8..cd0af3e 100644
--- a/src/move.c
+++ b/src/move.c
@@ -196,6 +196,7 @@
     // the cursor line.
     if (!screen_valid(TRUE) || curwin->w_height == 0)
     {
+	check_cursor_lnum();
 	curwin->w_topline = curwin->w_cursor.lnum;
 	curwin->w_botline = curwin->w_topline;
 	curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP;