diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-09-14 15:31:01 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-09-14 15:31:01 +0000 |
commit | f57cc5da1bceb61004225067c5c2111b96ebfdd7 (patch) | |
tree | e620c0a61f76a7c1fa52fadcce351bded118d8cd /src/main.c | |
parent | bd121a0e0440e7182d04eb22f099c96637f212ca (diff) | |
download | cflow-f57cc5da1bceb61004225067c5c2111b96ebfdd7.tar.gz cflow-f57cc5da1bceb61004225067c5c2111b96ebfdd7.tar.bz2 |
(main): Fixed coredump when no arguments were passed.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -669,10 +669,11 @@ main(int argc, char **argv) - /* See comment to cleanup_processor */ - for (arglist = CAR(arglist); arglist; arglist = CDR(arglist)) { - char *s = (char*)CAR(arglist); - if (s[0] == '-') - pp_option(s); - else if (source(s) == 0) - yyparse(); - } + if (arglist) + /* See comment to cleanup_processor */ + for (arglist = CAR(arglist); arglist; arglist = CDR(arglist)) { + char *s = (char*)CAR(arglist); + if (s[0] == '-') + pp_option(s); + else if (source(s) == 0) + yyparse(); + } |