From e069c1788c3f877c0656f09fa1c45a587ce30648 Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Sun, 19 Aug 2007 13:16:45 +0000 Subject: bugfix: extract_aptsfile() modified so that notify->apts_file is never set to null --- src/notify.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/notify.c b/src/notify.c index ab0a50c..8681bac 100755 --- a/src/notify.c +++ b/src/notify.c @@ -1,4 +1,4 @@ -/* $calcurse: notify.c,v 1.19 2007/08/15 15:33:01 culot Exp $ */ +/* $calcurse: notify.c,v 1.20 2007/08/19 13:16:45 culot Exp $ */ /* * Calcurse - text-based organizer @@ -75,8 +75,15 @@ notify_init_vars(void) static void extract_aptsfile(void) { - notify->apts_file = strrchr(path_apts, '/'); - notify->apts_file++; + char *file; + + file = strrchr(path_apts, '/'); + if (!file) + notify->apts_file = path_apts; + else { + notify->apts_file = file; + notify->apts_file++; + } } /* -- cgit v1.2.3-70-g09d2