styleproperty: Resolve NULL RGBAs to pink

.. instead of returning NULL and crashing.

Fixes no-colors reftest
This commit is contained in:
Benjamin Otte 2011-06-11 10:44:16 +02:00
parent a536a50dbd
commit 3a1da7f09c

View 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);