aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-02-16 17:01:55 +0100
committerThomas White <taw@physics.org>2023-02-16 17:01:55 +0100
commitd4d2ed7126ba3547347e95cb7b3d29a860979811 (patch)
tree31d8004106b29b13490e6f60bdcf4b8bdefe79f9
parent3de89bf4c5fd8525f058fc34e4217e9fab1ac449 (diff)
GUI: Avoid GTK warning if FoM unit cell is not set
-rw-r--r--src/gui_export.c6
1 files changed, 4 insertions, 2 deletions
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);