From e64e2ec6879410dc90c5d87f58268dd3eb2ec521 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 27 Mar 2019 16:07:17 +0100 Subject: compare_reindexed_cell_parameters: Bail out when there are no candidate vectors --- libcrystfel/src/cell-utils.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libcrystfel') 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); -- cgit v1.2.3