diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2011-01-18 02:20:43 +0100 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2011-01-18 02:20:43 +0100 |
commit | c6fa6b2062a1adf3e4945824048b3771edb35ebe (patch) | |
tree | 157c28a87d2060a5263a7add69f1a59e2f03fc01 | |
parent | f394ce8c052dd65c8343106964ba4431d97d261c (diff) | |
download | nautilus-c6fa6b2062a1adf3e4945824048b3771edb35ebe.tar.gz |
places-sidebar: plug a leak and cleanup code a bit
-rw-r--r-- | src/nautilus-places-sidebar.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c index e0a719e60..7929492f7 100644 --- a/src/nautilus-places-sidebar.c +++ b/src/nautilus-places-sidebar.c @@ -3127,20 +3127,10 @@ nautilus_places_sidebar_dispose (GObject *object) sidebar->eject_highlight_path = NULL; } - if (sidebar->store != NULL) { - g_object_unref (sidebar->store); - sidebar->store = NULL; - } - - if (sidebar->volume_monitor != NULL) { - g_object_unref (sidebar->volume_monitor); - sidebar->volume_monitor = NULL; - } - - if (sidebar->bookmarks != NULL) { - g_object_unref (sidebar->bookmarks); - sidebar->bookmarks = NULL; - } + g_clear_object (&sidebar->store); + g_clear_object (&sidebar->volume_monitor); + g_clear_object (&sidebar->bookmarks); + g_clear_object (&sidebar->filter_model); eel_remove_weak_pointer (&(sidebar->go_to_after_mount_slot)); |