Commit fa0b788d authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Handle base_path being null in the rest of the cases (#310270)

2005-09-02  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkfilechooserdefault.c: (shortcuts_add_volumes),
	(shortcuts_activate_volume):
	Handle base_path being null in the rest of the cases (#310270)
parent 81b729ca
2005-09-02 Alexander Larsson <alexl@redhat.com>
* gtk/gtkfilechooserdefault.c: (shortcuts_add_volumes),
(shortcuts_activate_volume):
Handle base_path being null in the rest of the cases (#310270)
2005-09-02 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Keep track of
......
2005-09-02 Alexander Larsson <alexl@redhat.com>
* gtk/gtkfilechooserdefault.c: (shortcuts_add_volumes),
(shortcuts_activate_volume):
Handle base_path being null in the rest of the cases (#310270)
2005-09-02 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Keep track of
......
......@@ -1617,13 +1617,16 @@ shortcuts_add_volumes (GtkFileChooserDefault *impl)
if (impl->local_only)
{
GtkFilePath *base_path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
gboolean is_local = gtk_file_system_path_is_local (impl->file_system, base_path);
gtk_file_path_free (base_path);
if (!is_local)
if (base_path != NULL)
{
gtk_file_system_volume_free (impl->file_system, volume);
continue;
gboolean is_local = gtk_file_system_path_is_local (impl->file_system, base_path);
gtk_file_path_free (base_path);
if (!is_local)
{
gtk_file_system_volume_free (impl->file_system, volume);
continue;
}
}
}
......@@ -6645,8 +6648,11 @@ shortcuts_activate_volume (GtkFileChooserDefault *impl,
}
path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
change_folder_and_display_error (impl, path);
gtk_file_path_free (path);
if (path != NULL)
{
change_folder_and_display_error (impl, path);
gtk_file_path_free (path);
}
out:
......
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