aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-04-03 15:57:02 +0200
committerThomas White <taw@physics.org>2019-04-03 15:57:02 +0200
commitc1b4861ace94179055e8ea746e631a15bc6b4364 (patch)
treea667c08a95a65179d449fe0c9a23bc623dd6f10c /libcrystfel
parent0a1a129583fdd191045df501d22a0342f612e548 (diff)
hdfsee: Fix crash with no geometry file
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/detector.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c
index 75d5bdb9..8c2f3828 100644
--- a/libcrystfel/src/detector.c
+++ b/libcrystfel/src/detector.c
@@ -1740,6 +1740,8 @@ struct detector *copy_geom(const struct detector *in)
struct detector *out;
int i;
+ if ( in == NULL ) return NULL;
+
out = malloc(sizeof(struct detector));
memcpy(out, in, sizeof(struct detector));