aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-06-04 16:59:08 +0200
committerThomas White <taw@physics.org>2010-06-04 16:59:08 +0200
commit31aa8ae2709740dab5ab6ec7a8e28dcd8709b72e (patch)
tree907ae99332e9ddf6371987b3bc36444031bf5220
parent8aceac72c01e5233cca21f505355e2acd8cfa4c9 (diff)
Check saturation table condition earlier
-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);