[gtk+] csscomputedvalues: Unref old value when setting new one
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] csscomputedvalues: Unref old value when setting new one
- Date: Sat, 7 Apr 2012 11:05:51 +0000 (UTC)
commit 7a7e2ed92b3427b71c8f2511440d3ff571b2a5d8
Author: Benjamin Otte <otte redhat com>
Date: Sat Mar 31 03:35:48 2012 +0200
csscomputedvalues: Unref old value when setting new one
gtk/gtkcsscomputedvalues.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcsscomputedvalues.c b/gtk/gtkcsscomputedvalues.c
index 305ff4f..37ad20b 100644
--- a/gtk/gtkcsscomputedvalues.c
+++ b/gtk/gtkcsscomputedvalues.c
@@ -194,6 +194,8 @@ _gtk_css_computed_values_set_value (GtkCssComputedValues *values,
if (id <= values->values->len)
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);
if (section)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]