From 8163eac969a895511a55f6fdd7554b4ad90bcfe7 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 7 Sep 2021 16:28:14 +0200 Subject: TakeTwo: Check for empty observed vector list --- libcrystfel/src/indexers/taketwo.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libcrystfel/src') diff --git a/libcrystfel/src/indexers/taketwo.c b/libcrystfel/src/indexers/taketwo.c index 78921a9f..0b652b9f 100644 --- a/libcrystfel/src/indexers/taketwo.c +++ b/libcrystfel/src/indexers/taketwo.c @@ -1831,6 +1831,11 @@ static int gen_observed_vecs(struct rvec *rlps, int rlp_count, } } + if ( count == 0 ) { + ERROR("No observed vectors for cell!\n"); + return 0; + } + /* Sort such that the shortest distances are searched first. */ qsort(cell->obs_vecs, count, sizeof(struct SpotVec), compare_spot_vecs); -- cgit v1.2.3