changeset 58267:eb96fac40fc7

(get_glyph_string_clip_rect, init_glyph_string): Check it's a window before using XWINDOW.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 16 Nov 2004 15:41:41 +0000
parents 9b0de37deb53
children fc159de41e11
files src/xdisp.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Tue Nov 16 15:41:09 2004 +0000
+++ b/src/xdisp.c	Tue Nov 16 15:41:41 2004 +0000
@@ -1789,7 +1789,8 @@
 
       /* If drawing a tool-bar window, draw it over the internal border
 	 at the top of the window.  */
-      if (s->w == XWINDOW (s->f->tool_bar_window))
+      if (WINDOWP (s->f->tool_bar_window)
+	  && s->w == XWINDOW (s->f->tool_bar_window))
 	r.y -= FRAME_INTERNAL_BORDER_WIDTH (s->f);
     }
 
@@ -17294,7 +17295,8 @@
   s->y = WINDOW_TO_FRAME_PIXEL_Y (w, row->y);
 
   /* Display the internal border below the tool-bar window.  */
-  if (s->w == XWINDOW (s->f->tool_bar_window))
+  if (WINDOWP (s->f->tool_bar_window)
+      && s->w == XWINDOW (s->f->tool_bar_window))
     s->y -= FRAME_INTERNAL_BORDER_WIDTH (s->f);
 
   s->ybase = s->y + row->ascent;