[gtk+] csscomputedvalues: Unset the section when setting a new value
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] csscomputedvalues: Unset the section when setting a new value
- Date: Mon, 1 Oct 2012 09:55:49 +0000 (UTC)
commit 2f89505b5484d7712ddc5771c754ca74e121610b
Author: Benjamin Otte <otte redhat com>
Date: Mon Oct 1 10:32:59 2012 +0200
csscomputedvalues: Unset the section when setting a new value
Otherwise we end up with the wrong section if no new one is specified.
gtk/gtkcsscomputedvalues.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcsscomputedvalues.c b/gtk/gtkcsscomputedvalues.c
index b60324e..12424cc 100644
--- a/gtk/gtkcsscomputedvalues.c
+++ b/gtk/gtkcsscomputedvalues.c
@@ -195,6 +195,12 @@ _gtk_css_computed_values_set_value (GtkCssComputedValues *values,
if (dependencies & (GTK_CSS_DEPENDS_ON_FONT_SIZE))
values->depends_on_font_size = _gtk_bitmask_set (values->depends_on_font_size, id, TRUE);
+ if (values->sections && values->sections->len > id && g_ptr_array_index (values->sections, id))
+ {
+ gtk_css_section_unref (g_ptr_array_index (values->sections, id));
+ g_ptr_array_index (values->sections, id) = NULL;
+ }
+
if (section)
{
if (values->sections == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]