diff options
author | Alberto Garcia <agarcia@igalia.com> | 2009-10-05 19:55:34 +0200 |
---|---|---|
committer | Alberto Garcia <agarcia@igalia.com> | 2009-10-05 19:55:34 +0200 |
commit | 10daa346b3de6571e9f03e54ac0d754e338a9afd (patch) | |
tree | 8ff4ed4bd90abca04995a096ef99f7f5c14e45dc /hildon/hildon-picker-button.c | |
parent | 92898106333744c340516845d69e6a167b3941d9 (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.c | 2 |
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), |