summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooser.c
diff options
context:
space:
mode:
authorCody Russell <bratsche@gnome.org>2008-02-11 01:51:14 +0000
committerCody Russell <bratsche@src.gnome.org>2008-02-11 01:51:14 +0000
commit97e0d1120f3ac52fe5a271ffb75b2eb81632a3f6 (patch)
tree60aedfe4552cdc76758857093f1198c3067909c0 /gtk/gtkfilechooser.c
parent5f12954d92c2d1126166e711e6ad3f2d6ab6ca0d (diff)
downloadgtk+-97e0d1120f3ac52fe5a271ffb75b2eb81632a3f6.tar.gz
Check the return value of _gtk_file_chooser_get_file_system () for NULL
2008-02-10 Cody Russell <bratsche@gnome.org> * gtk/gtkfilechooser.c (gtk_file_chooser_get_current_folder_uri): Check the return value of _gtk_file_chooser_get_file_system () for NULL before passing it to gtk_file_system_path_to_uri (). (#515667, Francesco Montorsi) svn path=/trunk/; revision=19508
Diffstat (limited to 'gtk/gtkfilechooser.c')
-rw-r--r--gtk/gtkfilechooser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkfilechooser.c b/gtk/gtkfilechooser.c
index dbaeba006e..e5e225b932 100644
--- a/gtk/gtkfilechooser.c
+++ b/gtk/gtkfilechooser.c
@@ -1049,6 +1049,9 @@ gtk_file_chooser_get_current_folder_uri (GtkFileChooser *chooser)
file_system = _gtk_file_chooser_get_file_system (chooser);
path = _gtk_file_chooser_get_current_folder_path (chooser);
+ if (!path)
+ return NULL;
+
uri = gtk_file_system_path_to_uri (file_system, path);
gtk_file_path_free (path);