aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/image.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-09-20 14:55:12 +0200
committerThomas White <taw@physics.org>2018-09-20 14:55:12 +0200
commit9178dce739cbfe1c14e105751778a0f7e61abad3 (patch)
tree1945c4c16fdf22afc2b0b721bc9a176387a1b2b9 /libcrystfel/src/image.c
parent26aab0b1039e9f66d6716fa7c650b47382e3d043 (diff)
Stop reading "simply" if file type is unknown
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r--libcrystfel/src/image.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index 31125725..d62e7ad5 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -896,8 +896,11 @@ int imagefile_read_simple(struct imagefile *f, struct image *image)
{
if ( f->type == IMAGEFILE_HDF5 ) {
return hdf5_read(f->hdfile, image, NULL, 0);
- } else {
+ } else if ( f->type == IMAGEFILE_CBF ) {
return read_cbf_simple(f, image);
+ } else {
+ ERROR("Unknown file type %i\n", f->type);
+ return 1;
}
}