aboutsummaryrefslogtreecommitdiff
path: root/src/gui_fom.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-02-18 13:09:57 +0100
committerThomas White <taw@physics.org>2021-02-18 13:09:57 +0100
commit705b7a94948cc8f0793c24efe00e36d2d2174085 (patch)
treef6d063054b770bced2bc6d9a1e59ccbb48db9ff2 /src/gui_fom.c
parent831574153f9b9a3da24ed91bba323c25d385b1f1 (diff)
GUI: Avoid passing a few NULLs to GTK
Diffstat (limited to 'src/gui_fom.c')
-rw-r--r--src/gui_fom.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui_fom.c b/src/gui_fom.c
index 20c77da9..0de99018 100644
--- a/src/gui_fom.c
+++ b/src/gui_fom.c
@@ -652,8 +652,10 @@ gint fom_sig(GtkWidget *widget, struct crystfelproject *proj)
GTK_FILE_CHOOSER_ACTION_OPEN);
gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(f->cell_chooser),
TRUE);
- gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(f->cell_chooser),
- proj->fom_cell_filename);
+ if ( proj->fom_cell_filename != NULL ) {
+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(f->cell_chooser),
+ proj->fom_cell_filename);
+ }
gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(f->cell_chooser),
FALSE, FALSE, 4.0);
button = gtk_button_new_from_icon_name("edit-clear",