aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Garcia <agarcia@igalia.com>2009-10-05 19:55:34 +0200
committerAlberto Garcia <agarcia@igalia.com>2009-10-05 19:55:34 +0200
commit10daa346b3de6571e9f03e54ac0d754e338a9afd (patch)
tree8ff4ed4bd90abca04995a096ef99f7f5c14e45dc
parent92898106333744c340516845d69e6a167b3941d9 (diff)
Fix memory leak in HildonPickerButton
* hildon/hildon-picker-button.c (hildon_picker_button_set_selector): Use g_object_ref_sink() when adding a selector to a picker button to make sure that we don't leak the selector if the button is destroyed without being used.
-rw-r--r--ChangeLog8
-rw-r--r--hildon/hildon-picker-button.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d0df8e..daa995a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-10-05 Alberto Garcia <agarcia@igalia.com>
+
+ * hildon/hildon-picker-button.c
+ (hildon_picker_button_set_selector):
+ Use g_object_ref_sink() when adding a selector to a picker button
+ to make sure that we don't leak the selector if the button is
+ destroyed without being used.
+
2009-10-01 Claudio Saavedra <csaavedra@igalia.com>
Fix HildonAppMenu crasher during destruction
diff --git a/hildon/hildon-picker-button.c b/hildon/hildon-picker-button.c
index a7a03f6..5264716 100644
--- a/hildon/hildon-picker-button.c
+++ b/hildon/hildon-picker-button.c
@@ -465,7 +465,7 @@ hildon_picker_button_set_selector (HildonPickerButton * button,
priv->selector = GTK_WIDGET (selector);
if (selector) {
- g_object_ref (selector);
+ g_object_ref_sink (selector);
g_signal_connect (G_OBJECT (selector), "changed",
G_CALLBACK (hildon_picker_button_selector_selection_changed),