diff options
author | Thomas White <taw@physics.org> | 2015-12-17 15:44:17 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-12-17 15:44:17 +0100 |
commit | fb09164b08898ae78f4b6128653be9044ab0a1bf (patch) | |
tree | 1374bd6764d91e29ec94d9a5ac28741e24676ba2 | |
parent | 41f7187901329fff3036e7b839d28895417945b8 (diff) |
list_events: Handle broken event list
-rw-r--r-- | src/list_events.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/list_events.c b/src/list_events.c index 1ef82701..44087233 100644 --- a/src/list_events.c +++ b/src/list_events.c @@ -175,6 +175,11 @@ int main(int argc, char *argv[]) } evlist = fill_event_list(hdfile, det); + if ( evlist == NULL ) { + ERROR("Failed to read %s\n", filename); + hdfile_close(hdfile); + continue; + } for ( i=0; i<evlist->num_events; i++ ) { char *str = get_event_string(evlist->events[i]); |