From 669c9df2ed66681f17a4b381d3d1deba4e5a08b2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 26 Aug 2022 13:09:26 +0200 Subject: GUI: Refuse to open "Index all frames" without a geometry filename Fixes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/73 --- src/gui_index.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui_index.c b/src/gui_index.c index 2634f525..b629c751 100644 --- a/src/gui_index.c +++ b/src/gui_index.c @@ -408,6 +408,13 @@ gint index_all_sig(GtkWidget *widget, struct crystfelproject *proj) if ( proj->indexing_opts != NULL ) return FALSE; + if ( proj->geom_filename == NULL ) { + error_box(proj, "No geometry file was selected. " + "You must select a geometry file via 'Load data' before using " + "this function"); + return FALSE; + } + njp = malloc(sizeof(struct new_index_job_params)); if ( njp == NULL ) return FALSE; -- cgit v1.2.3