[gnome-system-log/gnome-3-8] manager: don't clear the active log ref immediately on close
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-log/gnome-3-8] manager: don't clear the active log ref immediately on close
- Date: Mon, 15 Apr 2013 21:55:03 +0000 (UTC)
commit 0f226983d913b6807982c46d54641ff9e9205e30
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 file changed, 1 insertion(+), 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]