Skip to content

application: Take reference of GFile location when cloning window

Gary Li requested to merge li-gary/nautilus:clone-window-autoptr into master

Nautilus crashes under d45b820d when we open a second window and in both windows navigate to a common new location.

This is caused by incorrect reference management in action_clone_window, where neither nautilus_window_slot_get_location nor nautilus_window_slot_get_pending_location increases the ref count of the GFile location. g_autoptr would cause location to be prematurely freed.

Take the reference of location to allow g_autoptr to work correctly for all branches of action_clone_window.

Fixes #2858 (closed)

Merge request reports