aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hdf5-file.c5
1 files changed, 5 insertions, 0 deletions
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);