From 7cd3da83002d7f98794e8e20a5c76d1bb7ee562c Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 2 Mar 2008 19:51:00 +0000 Subject: [PATCH] Check that the widget is a GtkButton before casting. 2008-03-03 Tor Lillqvist * modules/engines/ms-windows/msw_style.c (draw_box): Check that the widget is a GtkButton before casting. svn path=/trunk/; revision=19690 --- ChangeLog | 5 +++++ modules/engines/ms-windows/msw_style.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 60ee4dfb4c..7c7adff900 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-03-03 Tor Lillqvist + + * modules/engines/ms-windows/msw_style.c (draw_box): Check that + the widget is a GtkButton before casting. + 2008-03-02 Johan Dahlin * configure.in: Compare using = instead of ==, which is portable. diff --git a/modules/engines/ms-windows/msw_style.c b/modules/engines/ms-windows/msw_style.c index aabf8f8e70..9c11b75bfc 100755 --- a/modules/engines/ms-windows/msw_style.c +++ b/modules/engines/ms-windows/msw_style.c @@ -2017,8 +2017,8 @@ draw_box (GtkStyle *style, } } else if (is_toolbar_child (widget->parent) - || (GTK_RELIEF_NONE == - gtk_button_get_relief (GTK_BUTTON (widget)))) + || (!GTK_IS_BUTTON (widget) || + (GTK_RELIEF_NONE == gtk_button_get_relief (GTK_BUTTON (widget))))) { if (draw_tool_button (window, widget, style, x, y, width, height, state_type, area))