]> Pileus Git - ~andy/gtk/commitdiff
Check the return value of _gtk_file_chooser_get_file_system () for NULL
authorCody Russell <bratsche@gnome.org>
Mon, 11 Feb 2008 01:51:14 +0000 (01:51 +0000)
committerCody Russell <bratsche@src.gnome.org>
Mon, 11 Feb 2008 01:51:14 +0000 (01:51 +0000)
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

ChangeLog
gtk/gtkfilechooser.c

index 5c253dc12bc9d500ea07a7613eef8dbf1cf672ef..abe907a0ced779dd2cc3b0dbce9a64b1c51f693d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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)
+
 2008-02-10  Philip Withnall  <pwithnall@svn.gnome.org>
 
        * gtk/gtkbuilder.c: Improve the documentation for
index dbaeba006ebd9796fc5f699229492821f3d76b8a..e5e225b932da0780aaec219df4d9006f134f03df 100644 (file)
@@ -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);