summaryrefslogtreecommitdiff
path: root/draw.c
diff options
context:
space:
mode:
authorlouie <lshprung@yahoo.com>2021-08-01 13:36:48 -0700
committerlouie <lshprung@yahoo.com>2021-08-01 13:36:48 -0700
commit77798c73c5ce16ef355436816514d703dfc84464 (patch)
tree8f84cb43840b8cb5fcc00425fe866190ea7d99e8 /draw.c
parentadc0e1599ba2d5859f306424b864541869028708 (diff)
Fixed invalid config path crash
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c6
1 files changed, 5 insertions, 1 deletions
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();