summaryrefslogtreecommitdiff
path: root/gtk/gtktoolbutton.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-05-03 18:22:42 +0200
committerBenjamin Otte <otte@redhat.com>2010-05-03 20:20:44 +0200
commitba3e997daea267b100988ecd7c6d0767c334dfbc (patch)
treec056e316c9d09ebe9ff3c93c96cb525e73d3351d /gtk/gtktoolbutton.c
parent33194ff5f46e39db123c8a4668d3a4b0bde48ecd (diff)
downloadgtk+-ba3e997daea267b100988ecd7c6d0767c334dfbc.tar.gz
Make toolbutton not call functions on non-GtkMisc
Diffstat (limited to 'gtk/gtktoolbutton.c')
-rw-r--r--gtk/gtktoolbutton.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c
index 422540168f..0e6ae592a9 100644
--- a/gtk/gtktoolbutton.c
+++ b/gtk/gtktoolbutton.c
@@ -470,11 +470,11 @@ gtk_tool_button_construct_contents (GtkToolItem *tool_item)
gtk_widget_show (icon);
}
- if (icon && text_orientation == GTK_ORIENTATION_HORIZONTAL)
+ if (GTK_IS_MISC (icon) && text_orientation == GTK_ORIENTATION_HORIZONTAL)
gtk_misc_set_alignment (GTK_MISC (icon),
1.0 - gtk_tool_item_get_text_alignment (GTK_TOOL_ITEM (button)),
0.5);
- else if (icon)
+ else if (GTK_IS_MISC (icon))
gtk_misc_set_alignment (GTK_MISC (icon),
0.5,
gtk_tool_item_get_text_alignment (GTK_TOOL_ITEM (button)));