aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-03-27 16:07:17 +0100
committerThomas White <taw@physics.org>2019-04-02 10:36:27 +0200
commite64e2ec6879410dc90c5d87f58268dd3eb2ec521 (patch)
tree21e8360d8ef4af93bcb3c5ffdd6c700eef8c8d9f /libcrystfel
parentc689f68bde8670f79171979bb209aecd773ddbc6 (diff)
compare_reindexed_cell_parameters: Bail out when there are no candidate vectors
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/cell-utils.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c
index 8e37240a..2a3bcfa2 100644
--- a/libcrystfel/src/cell-utils.c
+++ b/libcrystfel/src/cell-utils.c
@@ -2040,6 +2040,15 @@ int compare_reindexed_cell_parameters(UnitCell *cell_in, UnitCell *reference_in,
cand_b = find_candidates(b, av, bv, cv, ltl, &ncand_b);
cand_c = find_candidates(c, av, bv, cv, ltl, &ncand_c);
+ if ( (ncand_a==0) || (ncand_b==0) || (ncand_c==0) ) {
+ *pmb = NULL;
+ cell_free(cell);
+ cell_free(reference);
+ rtnl_mtx_free(CB);
+ rtnl_mtx_free(CiA);
+ return 0;
+ }
+
M = rtnl_mtx_new(3, 3);
MCB = rtnl_mtx_new(3, 3);
CiAMCB = rtnl_mtx_new(3, 3);