From 4313a39544cde16e5750f5affc1b7702770c1699 Mon Sep 17 00:00:00 2001 From: lshprung Date: Mon, 12 Oct 2020 22:20:55 -0700 Subject: Improved error messages and readme --- draw.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'draw.c') 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); -- cgit