diff options
Diffstat (limited to 'libcrystfel/src/events.c')
-rw-r--r-- | libcrystfel/src/events.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcrystfel/src/events.c b/libcrystfel/src/events.c index 8e4eb861..d0e521d3 100644 --- a/libcrystfel/src/events.c +++ b/libcrystfel/src/events.c @@ -150,6 +150,8 @@ struct event *copy_event(struct event *ev) struct event *new_ev; int pi, di; + if ( ev == NULL ) return NULL; + if ( ev->dim_length == 0 && ev->path_length == 0) { new_ev = initialize_event(); @@ -252,6 +254,8 @@ void free_event(struct event *ev) { int pi; + if ( ev == NULL ) return; + if ( ev->path_length != 0 ) { for ( pi=0; pi<ev->path_length; pi++ ) { free(ev->path_entries[pi]); |