[nautilus] places-sidebar: plug a leak and cleanup code a bit



commit c6fa6b2062a1adf3e4945824048b3771edb35ebe
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Jan 18 02:20:43 2011 +0100

    places-sidebar: plug a leak and cleanup code a bit

 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 e0a719e..7929492 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));
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]