From f8d6a14a1f551b3e2e9d3b3d76dbc9eace9cdee9 Mon Sep 17 00:00:00 2001 From: monsta Date: Mon, 8 Feb 2016 11:11:57 +0300 Subject: window-slot: fix wrong reference handling on dispose adapted from: https://git.gnome.org/browse/nautilus/commit/?id=97a2553ada8c8015fe22e6ec87e48123b29fa4d4 https://git.gnome.org/browse/nautilus/commit/?id=fd2685f838e613387179968d8e0b1326fe503a16 --- src/caja-window-slot.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/caja-window-slot.c b/src/caja-window-slot.c index 51847293..e7d53f2a 100644 --- a/src/caja-window-slot.c +++ b/src/caja-window-slot.c @@ -660,16 +660,8 @@ caja_window_slot_dispose (GObject *object) } caja_window_slot_set_viewed_file (slot, NULL); - /* TODO? why do we unref here? the file is NULL. - * It was already here before the slot move, though */ - caja_file_unref (slot->viewed_file); - if (slot->location) - { - /* TODO? why do we ref here, instead of unreffing? - * It was already here before the slot migration, though */ - g_object_ref (slot->location); - } + g_clear_object (&slot->location); g_list_free_full (slot->pending_selection, g_free); slot->pending_selection = NULL; -- cgit v1.2.1