Commit 778efbaa authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Don't access NULL slot->viewed_file if its not been set yet.

2008-10-17  Alexander Larsson  <alexl@redhat.com>

        * src/nautilus-spatial-window.c:
        (nautilus_spatial_window_save_scroll_position):
        (nautilus_spatial_window_save_show_hidden_files_mode):
        (real_window_close):
	Don't access NULL slot->viewed_file if its not been set yet.


svn path=/trunk/; revision=14730
parent f444e3e9
2008-10-17 Alexander Larsson <alexl@redhat.com>
* src/nautilus-spatial-window.c:
(nautilus_spatial_window_save_scroll_position):
(nautilus_spatial_window_save_show_hidden_files_mode):
(real_window_close):
Don't access NULL slot->viewed_file if its not been set yet.
2008-10-13 Nelson Benítez León <nbenitez@svn.gnome.org>
* libnautilus-private/nautilus-file-operations.c
......
......@@ -290,7 +290,8 @@ nautilus_spatial_window_save_scroll_position (NautilusWindowSlot *slot)
window = NAUTILUS_WINDOW (slot->window);
if (slot->content_view == NULL) {
if (slot->content_view == NULL ||
slot->viewed_file == NULL) {
return;
}
......@@ -309,6 +310,10 @@ nautilus_spatial_window_save_show_hidden_files_mode (NautilusWindowSlot *slot)
char *show_hidden_file_setting;
NautilusWindowShowHiddenFilesMode mode;
if (slot->viewed_file == NULL) {
return;
}
window = NAUTILUS_WINDOW (slot->window);
mode = NAUTILUS_WINDOW (window)->details->show_hidden_files_mode;
......@@ -470,7 +475,7 @@ real_window_close (NautilusWindow *window)
if (window->details->slots != NULL) {
slot = window->details->slots->data;
nautilus_spatial_window_save_geometry (slot);
nautilus_spatial_window_save_scroll_position (slot);
nautilus_spatial_window_save_show_hidden_files_mode (slot);
......
Markdown is supported
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