Protect against base_path being NULL. (#358405, many reporters)

2006-09-30  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserbutton.c (update_combo_box): Protect
        against base_path being NULL.  (#358405, many reporters)
This commit is contained in:
Matthias Clasen 2006-09-30 13:30:55 +00:00 committed by Matthias Clasen
parent 96741a1b05
commit 1077a08e5d
2 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2006-09-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserbutton.c (update_combo_box): Protect
against base_path being NULL. (#358405, many reporters)
2006-09-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilesystemunix.c: Apply a patch by Padraig O'Briain

View File

@ -2207,10 +2207,13 @@ update_combo_box (GtkFileChooserButton *button)
GtkFilePath *base_path;
base_path = gtk_file_system_volume_get_base_path (priv->fs, data);
row_found = (paths &&
paths->data &&
gtk_file_path_compare (base_path, paths->data) == 0);
gtk_file_path_free (base_path);
if (base_path)
{
row_found = (paths &&
paths->data &&
gtk_file_path_compare (base_path, paths->data) == 0);
gtk_file_path_free (base_path);
}
}
break;
default: