stylecontext: fix a StyleData refleak

We were failing to unref the style data in some code paths.

https://bugzilla.gnome.org/show_bug.cgi?id=683627
This commit is contained in:
Cosimo Cecchi 2012-09-13 13:48:43 -04:00
parent ee189efbc4
commit f57778e71e

View File

@ -3169,8 +3169,6 @@ _gtk_style_context_validate (GtkStyleContext *context,
data = style_data_lookup (context);
changes = _gtk_css_computed_values_get_difference (data->store, current->store);
style_data_unref (current);
}
else
{
@ -3190,6 +3188,9 @@ _gtk_style_context_validate (GtkStyleContext *context,
gtk_style_context_update_cache (context, parent_changes);
}
if (current)
style_data_unref (current);
if (change & GTK_CSS_CHANGE_ANIMATE &&
gtk_style_context_is_animating (context))
{