[gnome-shell] St: reference the StTheme from StThemeNode



commit 1b8d03f94509f5cd8f23d6a1e178873aa3020343
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Mon Jun 25 14:08:56 2012 +0200

    St: reference the StTheme from StThemeNode
    
    This is a partial revert of 7eaf231e566e8a8470589e743bac10475c1ce987,
    which caused segfaults. For some reason, StThemeNodes seem to survive
    style changes.

 src/st/st-theme-node.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/st/st-theme-node.c b/src/st/st-theme-node.c
index 27a59f1..651de02 100644
--- a/src/st/st-theme-node.c
+++ b/src/st/st-theme-node.c
@@ -85,6 +85,8 @@ st_theme_node_dispose (GObject *gobject)
       node->icon_colors = NULL;
     }
 
+  g_clear_object (&node->theme);
+
   G_OBJECT_CLASS (st_theme_node_parent_class)->dispose (gobject);
 }
 
@@ -194,6 +196,9 @@ st_theme_node_new (StThemeContext    *context,
   if (theme != NULL)
     node->theme = theme;
 
+  if (node->theme != NULL)
+    g_object_ref (node->theme);
+
   node->element_type = element_type;
   node->element_id = g_strdup (element_id);
   node->element_class = g_strdup (element_class);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]