]> Pileus Git - ~andy/gtk/commitdiff
styleproperty: Resolve NULL RGBAs to pink
authorBenjamin Otte <otte@redhat.com>
Sat, 11 Jun 2011 08:44:16 +0000 (10:44 +0200)
committerBenjamin Otte <otte@redhat.com>
Sat, 11 Jun 2011 08:44:16 +0000 (10:44 +0200)
.. instead of returning NULL and crashing.

Fixes no-colors reftest

gtk/gtkstyleproperty.c

index ee3ce04e865cd390d1e6e17c4098a3711cec5a32..e8a2114e89f7b25036260de54ee1b035c507cf6f 100644 (file)
@@ -1989,6 +1989,11 @@ _gtk_style_property_resolve (const GtkStyleProperty *property,
       g_value_init (val, property->pspec->value_type);
       _gtk_style_property_default_value (property, props, val);
     }
+  else if (G_VALUE_TYPE (val) == GDK_TYPE_RGBA)
+    {
+      if (g_value_get_boxed (val) == NULL)
+        _gtk_style_property_default_value (property, props, val);
+    }
   else if (G_VALUE_TYPE (val) == GTK_TYPE_GRADIENT)
     {
       g_return_if_fail (property->pspec->value_type == CAIRO_GOBJECT_TYPE_PATTERN);