aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-09-07 16:28:14 +0200
committerThomas White <taw@physics.org>2021-09-07 16:28:14 +0200
commit8163eac969a895511a55f6fdd7554b4ad90bcfe7 (patch)
tree664f2a31fabed0dbcbf8c3096fbf6befd7102be7 /libcrystfel
parent8ad898c4308f9f2e9a7b6f6b93808f5353f3d2bb (diff)
TakeTwo: Check for empty observed vector list
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/indexers/taketwo.c5
1 files changed, 5 insertions, 0 deletions
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);