aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-08-16 13:53:12 +0200
committerThomas White <taw@physics.org>2021-08-16 13:53:28 +0200
commitff9dd35c1c1d8e89a9c93db4eae9fba79621eedd (patch)
tree841dcb7e85c9c76ea5092bd195528bd5884c34c0
parent20a9a974474d0c620604a851e680f628f2b61aa6 (diff)
GUI: Avoid crash when trying to index no image
-rw-r--r--src/gui_index.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui_index.c b/src/gui_index.c
index 7aaefbf6..8524cc79 100644
--- a/src/gui_index.c
+++ b/src/gui_index.c
@@ -574,6 +574,11 @@ static void run_indexing_once(struct crystfelproject *proj)
char *tmpdir;
int r;
+ if ( proj->cur_image == NULL ) {
+ ERROR("No image to index!\n");
+ return;
+ }
+
if ( proj->indexing_params.cell_file != NULL ) {
cell = load_cell_from_file(proj->indexing_params.cell_file);
} else {