aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-06-09 11:53:53 +0200
committerThomas White <taw@physics.org>2015-06-09 11:53:53 +0200
commit92d1dd333d9587de77dd032599320523f5ccec9b (patch)
tree427e7a4b6f3f83935568c5ba4639493d86067742 /libcrystfel/src
parentaa2c6a34ca1700839c1d4ea7928aa6d561f45093 (diff)
match_cell(): Tidy up error handling when given a bogus lattice type
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/cell-utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c
index 43cf4337..9676aade 100644
--- a/libcrystfel/src/cell-utils.c
+++ b/libcrystfel/src/cell-utils.c
@@ -606,10 +606,12 @@ UnitCell *match_cell(UnitCell *cell_in, UnitCell *template_in, int verbose,
/* "Un-center" the template unit cell to make the comparison easier */
template = uncenter_cell(template_in, &uncentering);
+ if ( template == NULL ) return NULL;
/* The candidate cell is also uncentered, because it might be centered
* if it came from (e.g.) MOSFLM */
cell = uncenter_cell(cell_in, NULL);
+ if ( cell == NULL ) return NULL;
if ( cell_get_reciprocal(template, &asx, &asy, &asz,
&bsx, &bsy, &bsz,