diff options
Diffstat (limited to 'libcrystfel/src/integration.c')
-rw-r--r-- | libcrystfel/src/integration.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c index 9028711a..10e2b8a8 100644 --- a/libcrystfel/src/integration.c +++ b/libcrystfel/src/integration.c @@ -793,6 +793,8 @@ static int check_box(struct intcontext *ic, struct peak_box *bx, int *sat) double cdx, cdy, cdz; signed int hr, kr, lr; + if ( sat != NULL ) *sat = 0; + bx->bm = malloc(ic->w*ic->w*sizeof(int)); if ( bx->bm == NULL ) return 1; @@ -829,7 +831,7 @@ static int check_box(struct intcontext *ic, struct peak_box *bx, int *sat) if ( (bx->bm[p+ic->w*q] != BM_IG) && (bx->bm[p+ic->w*q] != BM_BH) && (boxi(ic, bx, p, q) > bx->p->max_adu) ) { - *sat = 1; + if ( sat != NULL ) *sat = 1; } /* Ignore if this pixel is closer to the next reciprocal lattice |