aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/stream.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-08-12 13:42:36 +0200
committerThomas White <taw@physics.org>2014-08-12 13:42:46 +0200
commit5b6749b20e1fe14f994df0eb3a8096d69a72326a (patch)
treed4fac0251f595a1c9e3c584721123e56c5dc84ce /libcrystfel/src/stream.c
parenta23db9bba0144007e6373a28c564908d2029ab01 (diff)
partial_sim: Fix free(geomfile)
Diffstat (limited to 'libcrystfel/src/stream.c')
-rw-r--r--libcrystfel/src/stream.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index 808be152..e7062e25 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -1043,6 +1043,8 @@ void write_geometry_file(Stream *st, const char *geom_filename) {
FILE *geom_fh;
char *rval;
+ if ( geom_filename == NULL ) return;
+
geom_fh = fopen(geom_filename, "r");
if ( geom_fh == NULL ) {
ERROR("Failed to read detector geometry from "