[gtk+] styleproperty: Resolve NULL RGBAs to pink
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] styleproperty: Resolve NULL RGBAs to pink
- Date: Sat, 11 Jun 2011 08:45:11 +0000 (UTC)
commit 3a1da7f09c2a5cc58cdd75c7ff46929b2c4848fc
Author: Benjamin Otte <otte redhat com>
Date: Sat Jun 11 10:44:16 2011 +0200
styleproperty: Resolve NULL RGBAs to pink
.. instead of returning NULL and crashing.
Fixes no-colors reftest
gtk/gtkstyleproperty.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c
index ee3ce04..e8a2114 100644
--- a/gtk/gtkstyleproperty.c
+++ b/gtk/gtkstyleproperty.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]