aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);