csscomputedvalues: Unref old value when setting new one

This commit is contained in:
Benjamin Otte 2012-03-31 03:35:48 +02:00
parent 246269faac
commit 7a7e2ed92b

View File

@ -194,6 +194,8 @@ _gtk_css_computed_values_set_value (GtkCssComputedValues *values,
if (id <= values->values->len) if (id <= values->values->len)
g_ptr_array_set_size (values->values, id + 1); g_ptr_array_set_size (values->values, id + 1);
if (g_ptr_array_index (values->values, id))
_gtk_css_value_unref (g_ptr_array_index (values->values, id));
g_ptr_array_index (values->values, id) = _gtk_css_value_ref (value); g_ptr_array_index (values->values, id) = _gtk_css_value_ref (value);
if (section) if (section)