From 4e09e180e4a47ab03193cad71273130817fb8d83 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 16 Oct 2012 06:00:40 -0400 Subject: Fix css parser tests Parsing a shorthand background property was running into unexpected errors when trying position values where there were none. To fix this, introduce a try_parse variant of the position parse function that silently returns NULL. --- gtk/gtkcssshorthandpropertyimpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gtk/gtkcssshorthandpropertyimpl.c') diff --git a/gtk/gtkcssshorthandpropertyimpl.c b/gtk/gtkcssshorthandpropertyimpl.c index 7dd3e3d1f2..0e9524d2ea 100644 --- a/gtk/gtkcssshorthandpropertyimpl.c +++ b/gtk/gtkcssshorthandpropertyimpl.c @@ -484,7 +484,7 @@ parse_one_background (GtkCssShorthandProperty *shorthand, values[0] = _gtk_css_image_value_new (image); } else if (values[1] == NULL && - (value = _gtk_css_position_value_parse (parser))) + (value = _gtk_css_position_value_try_parse (parser))) { values[1] = value; value = NULL; -- cgit v1.2.1