From 7419173e9cbe2b7108334af1c972b0231cfb0b44 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 19 Sep 2018 16:14:05 +0200 Subject: Stop opening file if it's not recognised --- libcrystfel/src/image.c | 5 +++++ 1 file changed, 5 insertions(+) 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); -- cgit v1.2.3