From: Stefan Monnier Date: Tue, 16 Nov 2004 15:41:41 +0000 (+0000) Subject: (get_glyph_string_clip_rect, init_glyph_string): Check it's X-Git-Tag: ttn-vms-21-2-B4~3894 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=94c4db3c609d6c84f8ffe413736819e1af7e1a87;p=emacs.git (get_glyph_string_clip_rect, init_glyph_string): Check it's a window before using XWINDOW. --- diff --git a/src/xdisp.c b/src/xdisp.c index e4e303941ef..2620485bbe3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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;