[gnome-applets] Fix a reference counting bug in the mixer.
- From: Callum McKenzie <callum src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-applets] Fix a reference counting bug in the mixer.
- Date: Thu, 21 May 2009 23:36:08 -0400 (EDT)
commit 028233636bb9fcd273a662794f397c8c02cdf466
Author: Callum McKenzie <callum spooky-possum org>
Date: Fri May 22 15:28:11 2009 +1200
Fix a reference counting bug in the mixer.
The dock was being unrefed from the applet, but the applet had never claimed
ownership in the firstplace. Hence odd crashes, see bug 546735.
---
mixer/ChangeLog | 6 ++++++
mixer/applet.c | 1 +
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/mixer/ChangeLog b/mixer/ChangeLog
index 5036a6b..d768ab4 100644
--- a/mixer/ChangeLog
+++ b/mixer/ChangeLog
@@ -1,3 +1,9 @@
+2009-05-22 Callum McKenzie <callum spooky-possum org>
+
+ * applet.c (gnome_volume_applet_dispose): Explicitly ref the dock,
+ to match our unref in the dispose code. This was creating odd
+ crashes due to double-dereferencing. See bug 546735.
+
2009-05-20 Callum McKenzie <callum spooky-possum org>
* applet.c:
diff --git a/mixer/applet.c b/mixer/applet.c
index dd49c26..7dcb411 100644
--- a/mixer/applet.c
+++ b/mixer/applet.c
@@ -918,6 +918,7 @@ gnome_volume_applet_orientation (PanelApplet *_applet,
}
dock = gnome_volume_applet_dock_new (GTK_ORIENTATION_VERTICAL,
applet);
+ g_object_ref_sink (dock); /* It isn't a child, but we do own it. */
gtk_widget_add_events (dock, GDK_FOCUS_CHANGE_MASK);
g_signal_connect (G_OBJECT (dock), "focus-out-event",
G_CALLBACK (gnome_volume_applet_dock_focus_out),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]