diff options
author | Thomas White <taw@physics.org> | 2014-12-14 16:55:14 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-12-14 16:55:14 +0100 |
commit | 391770cd92b1f3dc2d6800fed33eaf0a44325eb8 (patch) | |
tree | 6cdadb3781a949454cac58f1e5b03991abed7c82 /src | |
parent | 1a9b34cce39ca82981adc077b7624bdbe90b0158 (diff) |
Detect invalid event
Diffstat (limited to 'src')
-rw-r--r-- | src/dw-hdfsee.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c index 78f691b6..72e3b435 100644 --- a/src/dw-hdfsee.c +++ b/src/dw-hdfsee.c @@ -2546,6 +2546,11 @@ DisplayWindow *displaywindow_open(char *filename, char *geom_filename, if ( event != NULL ) { ev = get_event_from_event_string(event); dw->curr_event = find_event(ev, dw->ev_list); + if ( dw->curr_event == dw->ev_list->num_events) + { + ERROR("Invalid event\n"); + return NULL; + } } else { dw->curr_event = 0; ev = dw->ev_list->events[dw->curr_event]; |