stylecontext: Don't crash when colors are "none"

Instead, use their default value (pink).
This commit is contained in:
Benjamin Otte 2011-05-27 23:58:10 +02:00
parent 0d69d9558e
commit 940cdb4a7f

View File

@ -3369,7 +3369,10 @@ gtk_style_context_get_color (GtkStyleContext *context,
if (value)
{
c = g_value_get_boxed (value);
*color = *c;
if (c)
*color = *c;
else
gdk_rgba_parse (color, "pink");
}
}
@ -3410,7 +3413,10 @@ gtk_style_context_get_background_color (GtkStyleContext *context,
if (value)
{
c = g_value_get_boxed (value);
*color = *c;
if (c)
*color = *c;
else
gdk_rgba_parse (color, "pink");
}
}
@ -3451,7 +3457,10 @@ gtk_style_context_get_border_color (GtkStyleContext *context,
if (value)
{
c = g_value_get_boxed (value);
*color = *c;
if (c)
*color = *c;
else
gdk_rgba_parse (color, "pink");
}
}