aboutsummaryrefslogtreecommitdiff
path: root/hildon/hildon-picker-button.c
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 /hildon/hildon-picker-button.c
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.
Diffstat (limited to 'hildon/hildon-picker-button.c')
-rw-r--r--hildon/hildon-picker-button.c2
1 files changed, 1 insertions, 1 deletions
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),