diff options
-rw-r--r-- | src/gui_ambi.c | 4 | ||||
-rw-r--r-- | src/gui_fom.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/gui_ambi.c b/src/gui_ambi.c index d29ce6b0..0535dd99 100644 --- a/src/gui_ambi.c +++ b/src/gui_ambi.c @@ -225,7 +225,9 @@ static GtkWidget *make_ambigator_options(struct ambi_window *win) gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(win->use_operator), FALSE, FALSE, 4.0); win->operator = gtk_entry_new(); - gtk_entry_set_text(GTK_ENTRY(win->operator), proj->ambi_params.operator); + if ( proj->ambi_params.operator != NULL ) { + gtk_entry_set_text(GTK_ENTRY(win->operator), proj->ambi_params.operator); + } gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(win->operator), FALSE, FALSE, 4.0); g_signal_connect(G_OBJECT(win->use_operator), "toggled", 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", |