diff options
Diffstat (limited to 'src/im-sandbox.c')
-rw-r--r-- | src/im-sandbox.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/im-sandbox.c b/src/im-sandbox.c index e01fcb74..74467529 100644 --- a/src/im-sandbox.c +++ b/src/im-sandbox.c @@ -196,7 +196,7 @@ static struct filename_plus_event *get_pattern(FILE *fh, int config_basename, line = tmp; } - scan_check = sscanf(line, "%s %s", filename_buf, event_buf ); + scan_check = sscanf(line, "%s %s", filename_buf, event_buf); len = strlen(prefix)+strlen(filename_buf)+1; @@ -261,9 +261,15 @@ static struct filename_plus_event *get_pattern(FILE *fh, int config_basename, struct event *ev_to_add; ev_to_add = get_event_from_event_string(event_buf); - append_event_to_event_list(ev_list, ev_to_add); - free_event(ev_to_add); - event_index = 0; + if ( ev_to_add == NULL ) { + ERROR("Bad event descriptor: '%s'\n", + event_buf); + } else { + append_event_to_event_list(ev_list, + ev_to_add); + free_event(ev_to_add); + event_index = 0; + } } |