emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 33b31dc: Attempt to avoid rare segfaults in show_mouse_face


From: Eli Zaretskii
Subject: emacs-27 33b31dc: Attempt to avoid rare segfaults in show_mouse_face
Date: Fri, 6 Mar 2020 02:50:47 -0500 (EST)

branch: emacs-27
commit 33b31dc314cf71f3b1569f25756d69c6915168ff
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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)
---
 src/xdisp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/xdisp.c b/src/xdisp.c
index 3a8b5e3..a4de269 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]