From 1077a08e5d1cff92b621d97dacd17b33327f0671 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 30 Sep 2006 13:30:55 +0000 Subject: [PATCH] Protect against base_path being NULL. (#358405, many reporters) 2006-09-30 Matthias Clasen * gtk/gtkfilechooserbutton.c (update_combo_box): Protect against base_path being NULL. (#358405, many reporters) --- ChangeLog | 5 +++++ gtk/gtkfilechooserbutton.c | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6410756e94..ae61ee5bd1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-09-30 Matthias Clasen + + * gtk/gtkfilechooserbutton.c (update_combo_box): Protect + against base_path being NULL. (#358405, many reporters) + 2006-09-29 Matthias Clasen * gtk/gtkfilesystemunix.c: Apply a patch by Padraig O'Briain diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index 9c1d045547..828106c678 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -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: