From 77798c73c5ce16ef355436816514d703dfc84464 Mon Sep 17 00:00:00 2001 From: louie Date: Sun, 1 Aug 2021 13:36:48 -0700 Subject: Fixed invalid config path crash --- draw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'draw.c') diff --git a/draw.c b/draw.c index a66dc3b..daba27e 100644 --- a/draw.c +++ b/draw.c @@ -61,7 +61,11 @@ int main(int argc, char **argv){ if(!flags_set[0]) strcpy(cfg_path, find_config()); //find_config if not config flag was passed //Fill Groups - cfg_interp(cfg_path); //read the contents of the cfg file + //read the contents of the cfg file; print help message if invalid + if(!cfg_interp(cfg_path)){ + print_help(argv[0]); + return 0; + } //Remove Empty Groups from the Array clean_groups(); -- cgit