]> git.eshelyaron.com Git - emacs.git/commitdiff
Check if mouse_face_overlay was deleted (Bug#35273)
authorNoam Postavsky <npostavs@gmail.com>
Sat, 27 Apr 2019 19:22:11 +0000 (15:22 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Sun, 28 Apr 2019 12:31:17 +0000 (08:31 -0400)
* src/xdisp.c (note_mouse_highlight): Check if the mouse_face_overlay
actually points to a buffer, before calling
mouse_face_overlay_overlaps on it.

src/xdisp.c

index 0c3754a338fa43144e276ca73babf58f9b588faa..aa6e1bd2df8d2646757084af0218bd7f7d6b5d5d 100644 (file)
@@ -31526,7 +31526,9 @@ note_mouse_highlight (struct frame *f, int x, int y)
             is currently hidden to avoid Bug#30519.  */
          || (!hlinfo->mouse_face_hidden
              && OVERLAYP (hlinfo->mouse_face_overlay)
-             && mouse_face_overlay_overlaps (hlinfo->mouse_face_overlay)))
+             /* It's possible the overlay was deleted (Bug#35273).  */
+              && XMARKER (OVERLAY_START (hlinfo->mouse_face_overlay))->buffer
+              && mouse_face_overlay_overlaps (hlinfo->mouse_face_overlay)))
        {
          /* Find the highest priority overlay with a mouse-face.  */
          Lisp_Object overlay = Qnil;