Don't crash on NULL path; don't crash on NULL error.

2004-03-14  Morten Welinder  <terra@gnome.org>

	* gtk/gtkfilechooserdefault.c (error_dialog): Don't crash on NULL
	path; don't crash on NULL error.
This commit is contained in:
Morten Welinder 2004-03-14 19:47:20 +00:00 committed by Morten Welinder
parent e8a4c8442d
commit df8b419ecf
6 changed files with 37 additions and 10 deletions

View File

@ -1,3 +1,8 @@
2004-03-14 Morten Welinder <terra@gnome.org>
* gtk/gtkfilechooserdefault.c (error_dialog): Don't crash on NULL
path; don't crash on NULL error.
2004-03-14 Hans Breuer <hans@breuer.org> 2004-03-14 Hans Breuer <hans@breuer.org>
gtk/gtkcombobox.c : prototype cell_view_sync_cells() before gtk/gtkcombobox.c : prototype cell_view_sync_cells() before

View File

@ -1,3 +1,8 @@
2004-03-14 Morten Welinder <terra@gnome.org>
* gtk/gtkfilechooserdefault.c (error_dialog): Don't crash on NULL
path; don't crash on NULL error.
2004-03-14 Hans Breuer <hans@breuer.org> 2004-03-14 Hans Breuer <hans@breuer.org>
gtk/gtkcombobox.c : prototype cell_view_sync_cells() before gtk/gtkcombobox.c : prototype cell_view_sync_cells() before

View File

@ -1,3 +1,8 @@
2004-03-14 Morten Welinder <terra@gnome.org>
* gtk/gtkfilechooserdefault.c (error_dialog): Don't crash on NULL
path; don't crash on NULL error.
2004-03-14 Hans Breuer <hans@breuer.org> 2004-03-14 Hans Breuer <hans@breuer.org>
gtk/gtkcombobox.c : prototype cell_view_sync_cells() before gtk/gtkcombobox.c : prototype cell_view_sync_cells() before

View File

@ -1,3 +1,8 @@
2004-03-14 Morten Welinder <terra@gnome.org>
* gtk/gtkfilechooserdefault.c (error_dialog): Don't crash on NULL
path; don't crash on NULL error.
2004-03-14 Hans Breuer <hans@breuer.org> 2004-03-14 Hans Breuer <hans@breuer.org>
gtk/gtkcombobox.c : prototype cell_view_sync_cells() before gtk/gtkcombobox.c : prototype cell_view_sync_cells() before

View File

@ -1,3 +1,8 @@
2004-03-14 Morten Welinder <terra@gnome.org>
* gtk/gtkfilechooserdefault.c (error_dialog): Don't crash on NULL
path; don't crash on NULL error.
2004-03-14 Hans Breuer <hans@breuer.org> 2004-03-14 Hans Breuer <hans@breuer.org>
gtk/gtkcombobox.c : prototype cell_view_sync_cells() before gtk/gtkcombobox.c : prototype cell_view_sync_cells() before

View File

@ -662,10 +662,11 @@ error_dialog (GtkFileChooserDefault *impl,
const GtkFilePath *path, const GtkFilePath *path,
GError *error) GError *error)
{ {
char *uri; g_return_if_fail (path != NULL);
char *text;
uri = gtk_file_system_path_to_uri (impl->file_system, path); if (error)
{
char *uri = gtk_file_system_path_to_uri (impl->file_system, path);
text = g_strdup_printf (msg, text = g_strdup_printf (msg,
uri, uri,
error->message); error->message);
@ -674,6 +675,7 @@ error_dialog (GtkFileChooserDefault *impl,
g_free (uri); g_free (uri);
g_error_free (error); g_error_free (error);
} }
}
/* Displays an error message about not being able to get information for a file. /* Displays an error message about not being able to get information for a file.
* Frees the GError as well. * Frees the GError as well.