summaryrefslogtreecommitdiff
path: root/gtk/gtkcssarrayvalue.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-08-29 12:37:16 +0200
committerBenjamin Otte <otte@redhat.com>2012-09-03 12:54:14 +0200
commitfd7668bfb54674bda04cc74c2a6ad571939943e9 (patch)
treeda22b3f1c97ffbc380d1d6098d6087a286d24d81 /gtk/gtkcssarrayvalue.c
parent912d5a5c237683880144290333cef887b2591806 (diff)
downloadgtk+-fd7668bfb54674bda04cc74c2a6ad571939943e9.tar.gz
cssvalue: Don't allow empty arrays anymore
CSS arrays aren't empty, even the ones that appear empty contain one "none" element.
Diffstat (limited to 'gtk/gtkcssarrayvalue.c')
-rw-r--r--gtk/gtkcssarrayvalue.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gtk/gtkcssarrayvalue.c b/gtk/gtkcssarrayvalue.c
index 6c3cb4eb4d..fb22294c5c 100644
--- a/gtk/gtkcssarrayvalue.c
+++ b/gtk/gtkcssarrayvalue.c
@@ -128,13 +128,10 @@ static const GtkCssValueClass GTK_CSS_VALUE_ARRAY = {
gtk_css_value_array_print
};
-static GtkCssValue none_singleton = { &GTK_CSS_VALUE_ARRAY, 1, 0, { NULL } };
-
GtkCssValue *
_gtk_css_array_value_new (GtkCssValue *content)
{
- if (content == NULL)
- return _gtk_css_value_ref (&none_singleton);
+ g_return_val_if_fail (content != NULL, NULL);
return _gtk_css_array_value_new_from_array (&content, 1);
}