aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/events.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src/events.c')
-rw-r--r--libcrystfel/src/events.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcrystfel/src/events.c b/libcrystfel/src/events.c
index 633c9677..c9cc1ece 100644
--- a/libcrystfel/src/events.c
+++ b/libcrystfel/src/events.c
@@ -253,7 +253,9 @@ char *get_event_string(struct event *ev)
char *new_ret_string;
int ret_string_len;
- if ( ev->path_length != 0) {
+ if ( ev == NULL ) return "null event";
+
+ if ( ev->path_length != 0 ) {
int pi;