summaryrefslogtreecommitdiff
path: root/src/caja-places-sidebar.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-12-23 11:14:36 -0800
committerStefano Karapetsas <[email protected]>2012-12-23 11:14:36 -0800
commit3ec2cb1ade8ed91ed472091adcc592485dc49f4d (patch)
tree122f234160898266040a89a6767871856bd607c9 /src/caja-places-sidebar.c
parent8379b1dc107c9e0daf31ef1b654c9ab44d9bac23 (diff)
parentc598aa7e65d9e370c63f883acbbb6504044c2531 (diff)
downloadcaja-3ec2cb1ade8ed91ed472091adcc592485dc49f4d.tar.bz2
caja-3ec2cb1ade8ed91ed472091adcc592485dc49f4d.tar.xz
Merge pull request #65 from jasmineaura/develop
Most of remaining deprecations, some cleanups, and a leak fix
Diffstat (limited to 'src/caja-places-sidebar.c')
-rw-r--r--src/caja-places-sidebar.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/caja-places-sidebar.c b/src/caja-places-sidebar.c
index fa588663..88e7d1c1 100644
--- a/src/caja-places-sidebar.c
+++ b/src/caja-places-sidebar.c
@@ -53,7 +53,7 @@
#include "caja-places-sidebar.h"
#include "caja-window.h"
-#include "glibcompat.h" /* for g_list_free_full */
+#include "glibcompat.h" /* for g_list_free_full and g_clear_object */
#define EJECT_BUTTON_XPAD 6
#define ICON_CELL_XPAD 6
@@ -3332,20 +3332,10 @@ caja_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));