Check that the widget is a GtkButton before casting.

2008-03-03  Tor Lillqvist  <tml@novell.com>

	* modules/engines/ms-windows/msw_style.c (draw_box): Check that
	the widget is a GtkButton before casting.


svn path=/trunk/; revision=19690
This commit is contained in:
Tor Lillqvist 2008-03-02 19:51:00 +00:00 committed by Tor Lillqvist
parent d9c245e137
commit 7cd3da8300
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2008-03-03 Tor Lillqvist <tml@novell.com>
* modules/engines/ms-windows/msw_style.c (draw_box): Check that
the widget is a GtkButton before casting.
2008-03-02 Johan Dahlin <johan@gnome.org>
* configure.in: Compare using = instead of ==, which is portable.

View File

@ -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))