diff options
-rw-r--r-- | libcrystfel/src/detector.c | 2 | ||||
-rw-r--r-- | src/dw-hdfsee.c | 3 |
2 files changed, 4 insertions, 1 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)); diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c index ef576394..a4ba6e8a 100644 --- a/src/dw-hdfsee.c +++ b/src/dw-hdfsee.c @@ -3019,7 +3019,8 @@ DisplayWindow *displaywindow_open(char *filename, char *geom_filename, dw->multi_event = 0; } - if ( multi_event_geometry(dw->image->det) ) + if ( (dw->image->det != NULL) + && (multi_event_geometry(dw->image->det)) ) { struct hdfile *hdfile; |