From 94c4db3c609d6c84f8ffe413736819e1af7e1a87 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 16 Nov 2004 15:41:41 +0000 Subject: [PATCH] (get_glyph_string_clip_rect, init_glyph_string): Check it's a window before using XWINDOW. --- src/xdisp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.39.2