From: Eli Zaretskii Date: Thu, 6 Jun 2024 14:43:00 +0000 (+0300) Subject: Prevent another abort in 'cmcheckmagic' X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7f57b456db9b276dd782276e76cce5870ddd77e5;p=emacs.git Prevent another abort in 'cmcheckmagic' * src/dispnew.c (update_frame_line): Prevent rare aborts when TTY frame is resized. (Bug#71289) (cherry picked from commit 91f51f5ac5e6343359ffcadc8341b8da767aab87) --- diff --git a/src/dispnew.c b/src/dispnew.c index a3c5cbbcf00..8223b90f4a4 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5263,6 +5263,11 @@ update_frame_line (struct frame *f, int vpos, bool updating_menu_p) bool colored_spaces_p = (FACE_FROM_ID (f, DEFAULT_FACE_ID)->background != FACE_TTY_DEFAULT_BG_COLOR); + /* This should never happen, but evidently sometimes does if one + resizes the frame quickly enough. Prevent aborts in cmcheckmagic. */ + if (vpos >= FRAME_LINES (f)) + return; + if (colored_spaces_p) write_spaces_p = 1;