From 92d1dd333d9587de77dd032599320523f5ccec9b Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 9 Jun 2015 11:53:53 +0200 Subject: match_cell(): Tidy up error handling when given a bogus lattice type --- libcrystfel/src/cell-utils.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libcrystfel/src') 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, -- cgit v1.2.3