]> git.eshelyaron.com Git - emacs.git/commitdiff
(get_glyph_string_clip_rect, init_glyph_string): Check it's
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 16 Nov 2004 15:41:41 +0000 (15:41 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 16 Nov 2004 15:41:41 +0000 (15:41 +0000)
a window before using XWINDOW.

src/xdisp.c

index e4e303941ef423cbf835367fe95100713fd5aae3..2620485bbe3da353f61d16a120b2f83c7a113dbd 100644 (file)
@@ -1789,7 +1789,8 @@ get_glyph_string_clip_rect (s, nr)
 
       /* 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 @@ init_glyph_string (s, OPTIONAL_HDC (hdc) char2b, w, row, area, start, hl)
   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;