diff --git a/ChangeLog b/ChangeLog index 6d5059044c..0af7fb4ecd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-03-14 Morten Welinder + + * gtk/gtkfilechooserdefault.c (error_dialog): Don't crash on NULL + path; don't crash on NULL error. + 2004-03-14 Hans Breuer gtk/gtkcombobox.c : prototype cell_view_sync_cells() before diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6d5059044c..0af7fb4ecd 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2004-03-14 Morten Welinder + + * gtk/gtkfilechooserdefault.c (error_dialog): Don't crash on NULL + path; don't crash on NULL error. + 2004-03-14 Hans Breuer gtk/gtkcombobox.c : prototype cell_view_sync_cells() before diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 6d5059044c..0af7fb4ecd 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +2004-03-14 Morten Welinder + + * gtk/gtkfilechooserdefault.c (error_dialog): Don't crash on NULL + path; don't crash on NULL error. + 2004-03-14 Hans Breuer gtk/gtkcombobox.c : prototype cell_view_sync_cells() before diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 6d5059044c..0af7fb4ecd 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2004-03-14 Morten Welinder + + * gtk/gtkfilechooserdefault.c (error_dialog): Don't crash on NULL + path; don't crash on NULL error. + 2004-03-14 Hans Breuer gtk/gtkcombobox.c : prototype cell_view_sync_cells() before diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 6d5059044c..0af7fb4ecd 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2004-03-14 Morten Welinder + + * gtk/gtkfilechooserdefault.c (error_dialog): Don't crash on NULL + path; don't crash on NULL error. + 2004-03-14 Hans Breuer gtk/gtkcombobox.c : prototype cell_view_sync_cells() before diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 9f91b1072f..727e8f8c71 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -662,17 +662,19 @@ error_dialog (GtkFileChooserDefault *impl, const GtkFilePath *path, GError *error) { - char *uri; - char *text; + g_return_if_fail (path != NULL); - uri = gtk_file_system_path_to_uri (impl->file_system, path); - text = g_strdup_printf (msg, - uri, - error->message); - error_message (impl, text); - g_free (text); - g_free (uri); - g_error_free (error); + if (error) + { + char *uri = gtk_file_system_path_to_uri (impl->file_system, path); + text = g_strdup_printf (msg, + uri, + error->message); + error_message (impl, text); + g_free (text); + g_free (uri); + g_error_free (error); + } } /* Displays an error message about not being able to get information for a file.