[gnome-system-log] manager: don't clear the active log ref immediately on close



commit febc1baa30ee4035e20d513c2bd77a579f1d8fea
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Apr 11 17:32:52 2013 -0400

    manager: don't clear the active log ref immediately on close
    
    We were clearing the (possibly) last reference to a LogviewLog on close,
    but did not also clear out the priv->active_log pointer.
    Since also in case a log is closed we still want the active-changed
    signal to be emitted with the old log pointer as parameter, don't clear
    that ref and keep the internal state consistent. It will be cleared by
    the next call to logview_manager_set_active_log().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=697790

 src/logview-manager.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/logview-manager.c b/src/logview-manager.c
index b948bfa..83a81e5 100644
--- a/src/logview-manager.c
+++ b/src/logview-manager.c
@@ -411,8 +411,7 @@ logview_manager_close_active_log (LogviewManager *manager)
 
   g_object_unref (file);
 
-  /* we own two refs to the active log; one is inside the hash table */
-  g_object_unref (active_log);
+  /* drop the hash table ref */
   g_hash_table_remove (manager->priv->logs, log_uri);
 
   g_free (log_uri);


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