Skip to content
Commit 07fa5cdf authored by Carlos Soriano Sánchez's avatar Carlos Soriano Sánchez
Browse files

window-slot: use cancel_change instead of end_change

Nautilus slot ends any location change before starting a new
one or when is done loading.

The done loading signal is emitted when the view finalize to load
a directory.

However, when loading a new location, if the previous one was not
finalized to load, nautilus was crashing, due to the is-loading signal
in the view first emitting it for finalizing the previous location
change.

Then the callback of window slot was freeing the new_content_view,
because this callback can be done when canceling a location change.
However, at that time, the new_content_view is actually the one which
is going to be used as a content view when we are just changing
locations, for example, while searching.

It's kind of strange that the callback of the view ending a load
frees the new_content_view, since this is already managed by setup_view.
And since we already have a cancel_location_change, we can use that
on the majority of situations when we actually want to cancel a change,
and let the end_location callback for the specific case of ending a load
of the view.

So now only the cancel_location_change frees the new_content_view, and
we avoid a crash freeing the current view while loading it when changing
locations.

This is the last patch of the series of patches to fix the crashing
nautilus while searching.

https://bugzilla.gnome.org/show_bug.cgi?id=759717
parent 7d45760c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment