From d4d2ed7126ba3547347e95cb7b3d29a860979811 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 16 Feb 2023 17:01:55 +0100 Subject: GUI: Avoid GTK warning if FoM unit cell is not set --- src/gui_export.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gui_export.c b/src/gui_export.c index b0aef972..c0fbfd1c 100644 --- a/src/gui_export.c +++ b/src/gui_export.c @@ -284,8 +284,10 @@ gint export_sig(GtkWidget *widget, struct crystfelproject *proj) /* Use the "FoM" cell file because there should only be one * point of truth for the "final" cell parameters. Eventually, I hope * to determine this automatically. */ - gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(win->cell_chooser), - proj->fom_cell_filename); + if ( proj->fom_cell_filename != NULL ) { + gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(win->cell_chooser), + proj->fom_cell_filename); + } gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(win->cell_chooser), FALSE, FALSE, 4.0); -- cgit v1.2.3