changeset 30826:f225a6bd06fc

(IT_update_begin): Don't crash if mouse_face_mouse_frame member of display_info is NULL.
author Eli Zaretskii <eliz@gnu.org>
date Tue, 15 Aug 2000 20:59:20 +0000
parents d725233e5dbc
children 7087bbfb6e30
files src/msdos.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/msdos.c	Tue Aug 15 19:26:40 2000 +0000
+++ b/src/msdos.c	Tue Aug 15 20:59:20 2000 +0000
@@ -1913,12 +1913,13 @@
 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 @@
 	    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 @@
   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)