From 916a05516b05bd2c9fd42c730f9a859be9226716 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 7 Sep 2020 16:02:57 +0200 Subject: main: fix segfault when passed source file is empty Signed-off-by: Jo-Philipp Wich --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index de429ab..9850b81 100644 --- a/main.c +++ b/main.c @@ -235,7 +235,7 @@ main(int argc, char **argv) } } - rv = parse(source, dumponly); + rv = source ? parse(source, dumponly) : 0; out: if (input && input != stdin) -- cgit v1.2.3