From ff9dd35c1c1d8e89a9c93db4eae9fba79621eedd Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 16 Aug 2021 13:53:12 +0200 Subject: GUI: Avoid crash when trying to index no image --- src/gui_index.c | 5 +++++ 1 file changed, 5 insertions(+) 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 { -- cgit v1.2.3