diff options
author | Frederic Culot <calcurse@culot.org> | 2007-08-19 13:16:45 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2007-08-19 13:16:45 +0000 |
commit | e069c1788c3f877c0656f09fa1c45a587ce30648 (patch) | |
tree | eafdaae55ac50d5650c270308e45526cd6bf3129 /src | |
parent | c1a741f2873f7c9517e2f8087c335b58a2db80a5 (diff) | |
download | calcurse-e069c1788c3f877c0656f09fa1c45a587ce30648.zip |
bugfix: extract_aptsfile() modified so that notify->apts_file is never set
to null
Diffstat (limited to 'src')
-rwxr-xr-x | src/notify.c | 13 |
1 files 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++; + } } /* |