mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 23:10:22 +00:00
csscomputedvalues: Unref old value when setting new one
This commit is contained in:
parent
246269faac
commit
7a7e2ed92b
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user