From 40a8132c59cbd02566470ff64c4fd2d0fab1c013 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 128b52f7..13dcf9bc 100644 --- a/src/caja-window-slot.c +++ b/src/caja-window-slot.c @@ -651,16 +651,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