From: Eli Zaretskii Date: Fri, 6 Mar 2020 07:48:10 +0000 (+0200) Subject: Attempt to avoid rare segfaults in show_mouse_face X-Git-Tag: emacs-27.0.91~125 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=33b31dc314;p=emacs.git Attempt to avoid rare segfaults in show_mouse_face * src/xdisp.c (show_mouse_face): Don't display the active region if called on a frame different from the one recorded in HLINFO. (Bug#37671) --- diff --git a/src/xdisp.c b/src/xdisp.c index 3a8b5e3f1d0..a4de2698ca0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -31454,6 +31454,10 @@ show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw) struct window *w = XWINDOW (hlinfo->mouse_face_window); struct frame *f = XFRAME (WINDOW_FRAME (w)); + /* Don't bother doing anything if we are on a wrong frame. */ + if (f != hlinfo->mouse_face_mouse_frame) + return; + if (/* If window is in the process of being destroyed, don't bother to do anything. */ w->current_matrix != NULL