]> Pileus Git - ~andy/gtk/commitdiff
Allow calling gtk_widget_style_attach() only when realized
authorMichael Natterer <mitch@gimp.org>
Thu, 11 Feb 2010 08:27:05 +0000 (09:27 +0100)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Sun, 4 Apr 2010 00:56:12 +0000 (20:56 -0400)
gtk/gtkwidget.c

index 2c8608191ffde7fad55df6d8e668be5d593d507e..a9674f7d282119a23e81e517d2fa5f368e659c09 100644 (file)
@@ -6424,6 +6424,7 @@ void
 gtk_widget_style_attach (GtkWidget *widget)
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
+  g_return_if_fail (GTK_WIDGET_REALIZED (widget));
 
   widget->style = gtk_style_attach (widget->style, widget->window);
 }