From a2637fde88a99e222c98a15ed214f673a083821d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 6 Mar 2014 17:55:58 +0100 Subject: Don't break if there are no reflections in the list --- src/ambigator.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/ambigator.c b/src/ambigator.c index fe295cf7..018ed186 100644 --- a/src/ambigator.c +++ b/src/ambigator.c @@ -245,6 +245,11 @@ static float corr(struct flist *a, struct flist *b, int *pn, int a_reidx) ia = a->i; } + if ( (a->n == 0) || (b->n == 0) ) { + *pn = 0; + return 0.0; + } + while ( 1 ) { while ( sa[ap] > b->s[bp] ) { -- cgit v1.2.3