aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-09-19 16:14:05 +0200
committerThomas White <taw@physics.org>2018-09-19 16:14:05 +0200
commit7419173e9cbe2b7108334af1c972b0231cfb0b44 (patch)
tree9b2ff7e9b15927207f105dea5e25ef4b99243b87 /libcrystfel
parentbe50234915ad73cce28578863796cb1d359ef114 (diff)
Stop opening file if it's not recognised
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/image.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index f67a38e8..20f53849 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -948,6 +948,11 @@ struct imagefile *imagefile_open(const char *filename)
f->type = IMAGEFILE_CBF;
+ } else {
+
+ ERROR("Unrecognised file type: %s\n", filename);
+ return NULL;
+
}
f->filename = strdup(filename);