diff options
author | Thomas White <taw@physics.org> | 2014-04-08 15:17:06 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-04-08 15:17:06 +0200 |
commit | cc9fba732caad42a0ad9230ba22e65e4d3e6f571 (patch) | |
tree | 39d6897e8310bc29a7418e7b3328f38b4ebb801b /src/ambigator.c | |
parent | b4dc27e6212ef444e51536898be6b5825166e16b (diff) |
ambigator: Avoid NULL dereference if unit cell is not found in stream
Diffstat (limited to 'src/ambigator.c')
-rw-r--r-- | src/ambigator.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ambigator.c b/src/ambigator.c index a922cacc..c55148b3 100644 --- a/src/ambigator.c +++ b/src/ambigator.c @@ -115,9 +115,13 @@ static struct flist *asymm_and_merge(RefList *in, const SymOpList *sym, get_indices(refl, &h, &k, &l); - res = 2.0*resolution(cell, h, k, l); - if ( res < rmin ) continue; - if ( res > rmax ) continue; + if ( cell != NULL ) { + ERROR("Can't calculate resolution cutoff - no cell\n"); + } else { + res = 2.0*resolution(cell, h, k, l); + if ( res < rmin ) continue; + if ( res > rmax ) continue; + } get_asymm(sym, h, k, l, &ha, &ka, &la); |