From 31aa8ae2709740dab5ab6ec7a8e28dcd8709b72e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 4 Jun 2010 16:59:08 +0200 Subject: Check saturation table condition earlier --- src/hdf5-file.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/hdf5-file.c') diff --git a/src/hdf5-file.c b/src/hdf5-file.c index 622fc409..a5fc7d26 100644 --- a/src/hdf5-file.c +++ b/src/hdf5-file.c @@ -242,6 +242,11 @@ static void debodge_saturation(struct hdfile *f, struct image *image) dh = H5Dopen(f->fh, "/processing/hitfinder/peakinfo_saturated", H5P_DEFAULT); + if ( dh < 0 ) { + ERROR("Couldn't open saturation table.\n"); + return; + } + sh = H5Dget_space(dh); if ( sh < 0 ) { H5Dclose(dh); -- cgit v1.2.3