css: Initialize values to their specified type

.. when parsing.
This commit is contained in:
Benjamin Otte 2012-01-14 04:39:07 +01:00
parent 25affd4766
commit f7e0ce3b28
2 changed files with 1 additions and 3 deletions

View File

@ -201,7 +201,7 @@ gtk_css_style_property_parse_value (GtkStyleProperty *property,
return TRUE;
}
g_value_init (value, _gtk_style_property_get_value_type (property));
g_value_init (value, _gtk_css_style_property_get_specified_type (style_property));
if (!(* style_property->parse_value) (style_property, value, parser, base))
{
g_value_unset (value);

View File

@ -418,8 +418,6 @@ css_image_value_parse (GtkCssStyleProperty *property,
return FALSE;
}
g_value_unset (value);
g_value_init (value, GTK_TYPE_CSS_IMAGE);
g_value_take_object (value, image);
return TRUE;
}