summaryrefslogtreecommitdiff
path: root/draw.c
diff options
context:
space:
mode:
authorlshprung <lshprung@yahoo.com>2020-10-12 22:20:55 -0700
committerlshprung <lshprung@yahoo.com>2020-10-12 22:20:55 -0700
commit4313a39544cde16e5750f5affc1b7702770c1699 (patch)
tree71e0ea2862f0daad8c40fbce0869c6f5699a9cff /draw.c
parentd529fcc336110d243beeef3d393c1122a8238a39 (diff)
Improved error messages and readme
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/draw.c b/draw.c
index ced51fb..c72eb6e 100644
--- a/draw.c
+++ b/draw.c
@@ -67,6 +67,12 @@ int main(int argc, char **argv){
g = get_groups(); //retrieve results of cfg_interp
g_count = get_gcount(g); //retrieve number of groups in g (only do this after removing empty groups)
+ //check that there are is at least one valid group
+ if(g_count == 0){
+ printf("Error: No Entries!\n");
+ exit(0);
+ }
+
initscr();
cbreak();
keypad(stdscr, true);