summaryrefslogtreecommitdiff
path: root/src/caja-window-slot.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-02-08 11:11:57 +0300
committermonsta <[email protected]>2016-02-15 17:02:01 +0300
commit40a8132c59cbd02566470ff64c4fd2d0fab1c013 (patch)
treeadb0ae68939c5360a40bc7e1ce580caf71cbeb55 /src/caja-window-slot.c
parentef80bf2011986bd4570c0975872c3896e17c4f30 (diff)
downloadcaja-40a8132c59cbd02566470ff64c4fd2d0fab1c013.tar.bz2
caja-40a8132c59cbd02566470ff64c4fd2d0fab1c013.tar.xz
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
Diffstat (limited to 'src/caja-window-slot.c')
-rw-r--r--src/caja-window-slot.c10
1 files changed, 1 insertions, 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;