From: Eli Zaretskii Date: Tue, 15 Aug 2000 21:02:00 +0000 (+0000) Subject: (IT_update_begin): Don't crash if mouse_face_mouse_frame X-Git-Tag: emacs-pretest-21.0.90~2287 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b9f80d41be5cfadaec0c1a12653a50bf5ebb72fa;p=emacs.git (IT_update_begin): Don't crash if mouse_face_mouse_frame member of display_info is NULL. --- diff --git a/src/ChangeLog b/src/ChangeLog index a019ab9f34b..d471dc885f9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2000-08-15 Eli Zaretskii + + * msdos.c (IT_update_begin): Don't crash if mouse_face_mouse_frame + member of display_info is NULL. + 2000-08-15 Gerd Moellmann * alloc.c (compact_small_strings): Use safe_bcopy, add an diff --git a/src/msdos.c b/src/msdos.c index 9387f81ad20..a711f84cf13 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -1913,12 +1913,13 @@ static void IT_update_begin (struct frame *f) { struct display_info *display_info = FRAME_X_DISPLAY_INFO (f); + struct frame *mouse_face_frame = display_info->mouse_face_mouse_frame; highlight = 0; BLOCK_INPUT; - if (f == display_info->mouse_face_mouse_frame) + if (f && f == mouse_face_frame) { /* Don't do highlighting for mouse motion during the update. */ display_info->mouse_face_defer = 1; @@ -1955,7 +1956,7 @@ IT_update_begin (struct frame *f) clear_mouse_face (display_info); } } - else if (!FRAME_LIVE_P (display_info->mouse_face_mouse_frame)) + else if (mouse_face_frame && !FRAME_LIVE_P (mouse_face_frame)) { /* If the frame with mouse highlight was deleted, invalidate the highlight info. */ @@ -1986,7 +1987,7 @@ IT_frame_up_to_date (struct frame *f) struct window *sw; if (dpyinfo->mouse_face_deferred_gc - || f == dpyinfo->mouse_face_mouse_frame) + || (f && f == dpyinfo->mouse_face_mouse_frame)) { BLOCK_INPUT; if (dpyinfo->mouse_face_mouse_frame)