Commit 03d07cce authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair

Ensure that hash table is not NULL before getting keys if the selection

2008-08-16  Christian Neumair  <cneumair@gnome.org>

	* src/file-manager/fm-directory-view.c
	(update_restore_from_trash_action):
	Ensure that hash table is not NULL before getting keys if the
	selection does not contain exactly one item.

svn path=/trunk/; revision=14478
parent 2e68dc0d
2008-08-16 Christian Neumair <cneumair@gnome.org>
* src/file-manager/fm-directory-view.c
(update_restore_from_trash_action):
Ensure that hash table is not NULL before getting keys if the
selection does not contain exactly one item.
2008-08-16 Christian Neumair <cneumair@gnome.org>
* src/file-manager/fm-directory-view.c
......
......@@ -7271,9 +7271,11 @@ update_restore_from_trash_action (GtkAction *action,
original_file = nautilus_file_get_trash_original_file (files->data);
} else {
original_dirs_hash = get_original_directories (files, NULL);
original_dirs = g_hash_table_get_keys (original_dirs_hash);
if (original_dirs_hash != NULL && g_list_length (original_dirs) == 1) {
original_dir = nautilus_file_ref (NAUTILUS_FILE (original_dirs->data));
if (original_dirs_hash != NULL) {
original_dirs = g_hash_table_get_keys (original_dirs_hash);
if (g_list_length (original_dirs) == 1) {
original_dir = nautilus_file_ref (NAUTILUS_FILE (original_dirs->data));
}
}
}
}
......
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