int count = SPECPDL_INDEX ();
#ifdef HAVE_WINDOW_SYSTEM
struct frame *f = XFRAME (w->frame);
- Display_Info *dpyinfo = (f && FRAME_X_OUTPUT (f)) ?
- FRAME_X_DISPLAY_INFO (f) : NULL;
+ Display_Info *dpyinfo;
#endif
w->buffer = buffer;
#ifdef HAVE_WINDOW_SYSTEM
BLOCK_INPUT;
- if (dpyinfo && EQ (window, dpyinfo->mouse_face_window))
+ if (f && FRAME_X_OUTPUT (f)
+ && (dpyinfo = FRAME_X_DISPLAY_INFO (f))
+ && EQ (window, dpyinfo->mouse_face_window))
clear_mouse_face (dpyinfo);
UNBLOCK_INPUT;
#endif