Index: gtk/gtkfilechooserdefault.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkfilechooserdefault.c,v
retrieving revision 1.279
diff -u -p -u -r1.279 gtkfilechooserdefault.c
--- gtk/gtkfilechooserdefault.c	26 Jul 2005 18:43:27 -0000	1.279
+++ gtk/gtkfilechooserdefault.c	11 Aug 2005 21:35:10 -0000
@@ -1075,6 +1075,8 @@ change_folder_and_display_error (GtkFile
   gboolean result;
   GtkFilePath *path_copy;
 
+  g_return_val_if_fail (path != NULL, FALSE);
+
   profile_start ("start", (char *) path);
 
   /* We copy the path because of this case:
@@ -2034,6 +2036,8 @@ shortcut_find_position (GtkFileChooserDe
   int i;
   int current_folder_separator_idx;
 
+  g_return_val_if_fail (path != NULL, -1);
+
   if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (impl->shortcuts_model), &iter))
     return -1;
 
@@ -2060,8 +2064,8 @@ shortcut_find_position (GtkFileChooserDe
 	      volume = col_data;
 	      base_path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
 
-	      exists = strcmp (gtk_file_path_get_string (path),
-			       gtk_file_path_get_string (base_path)) == 0;
+	      exists = base_path && strcmp (gtk_file_path_get_string (path),
+					    gtk_file_path_get_string (base_path)) == 0;
 	      g_free (base_path);
 
 	      if (exists)
@@ -2091,6 +2095,8 @@ shortcuts_add_bookmark_from_path (GtkFil
 				  int                    pos)
 {
   GError *error;
+
+  g_return_val_if_fail (path != NULL, FALSE);
 
   if (shortcut_find_position (impl, path) != -1)
     return FALSE;
