[gtk+] stylecontext: fix a StyleData refleak
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] stylecontext: fix a StyleData refleak
- Date: Thu, 13 Sep 2012 21:01:48 +0000 (UTC)
commit f57778e71e4d49cacfa4ece2b44ba0d9ea6f207a
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Sep 13 13:48:43 2012 -0400
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
gtk/gtkstylecontext.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 0b3cf04..63ac1de 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -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))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]