diff options
author | Thomas White <taw@physics.org> | 2021-06-16 14:48:04 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-06-16 14:48:04 +0200 |
commit | 037b419546bb947b927a95d1365e3ef9a82c4310 (patch) | |
tree | cad71c4557f5c0ad340df08fef2a4ab0d1c79675 /libcrystfel/src/stream.c | |
parent | 3fffe0c4cb5efb4c33e819708f0808aa419ea678 (diff) |
stream_read_chunk: Bail out if detgeom can't be created
Diffstat (limited to 'libcrystfel/src/stream.c')
-rw-r--r-- | libcrystfel/src/stream.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index 68643a17..33f1b4a8 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -1080,7 +1080,10 @@ struct image *stream_read_chunk(Stream *st, StreamFlags srf) if ( have_filename && have_ev ) { /* Success */ if ( srf & STREAM_DATA_DETGEOM ) { - create_detgeom(image, st->dtempl_read); + if ( create_detgeom(image, st->dtempl_read) ) { + image_free(image); + return NULL; + } image_set_zero_data(image, st->dtempl_read); image_set_zero_mask(image, st->dtempl_read); } |