From dab8efaff83c59ddd4d33cecd577bf2aa592eb25 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 21 Jul 2021 14:13:48 +0200 Subject: image_hdf5_read_peaks_cxi: Fix error checks --- libcrystfel/src/image-hdf5.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/image-hdf5.c b/libcrystfel/src/image-hdf5.c index 9cad0a33..494254cc 100644 --- a/libcrystfel/src/image-hdf5.c +++ b/libcrystfel/src/image-hdf5.c @@ -1283,19 +1283,19 @@ ImageFeatureList *image_hdf5_read_peaks_cxi(const DataTemplate *dtempl, } buf_x = read_peak_line(fh, path_x, line); - if ( r != 0 ) { + if ( buf_x == NULL ) { close_hdf5(fh); return NULL; } buf_y = read_peak_line(fh, path_y, line); - if ( r != 0 ) { + if ( buf_y == NULL ) { close_hdf5(fh); return NULL; } buf_i = read_peak_line(fh, path_i, line); - if ( r != 0 ) { + if ( buf_i == NULL ) { close_hdf5(fh); return NULL; } -- cgit v1.2.3