diff options
author | Alexander Larsson <alexl@redhat.com> | 2005-09-02 13:33:06 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2005-09-02 13:33:06 +0000 |
commit | fa0b788dde87d1c4cfe49ede1232d9619d6cc4a9 (patch) | |
tree | 753c9998c2486b3f5500db76b49287a3717dccc4 | |
parent | 81b729cabefeb1d3bd42a6357d7214e8a78000c8 (diff) | |
download | gtk+-fa0b788dde87d1c4cfe49ede1232d9619d6cc4a9.tar.gz |
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)
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 6 | ||||
-rw-r--r-- | gtk/gtkfilechooserdefault.c | 22 |
3 files changed, 26 insertions, 8 deletions
@@ -1,3 +1,9 @@ +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 diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index bb88c89fca..7a24e7d74b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +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 diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 49dd51668f..a49e2f1bb2 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -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: |