diff options
author | Frederic Culot <calcurse@culot.org> | 2009-01-22 18:11:56 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2009-01-22 18:11:56 +0000 |
commit | d8861f877ec1e52ff03781fa2246e7343a9387ae (patch) | |
tree | 40a419e39ea5ae5ba62dffdb555aa896ac1adffb /src/notify.c | |
parent | 38912b36daf4fe23436080b155a7b5a52ad2db7d (diff) | |
download | calcurse-d8861f877ec1e52ff03781fa2246e7343a9387ae.tar.gz calcurse-d8861f877ec1e52ff03781fa2246e7343a9387ae.zip |
bugfix: avoid possible segfault if notify_stop_main_thread is called before thread was launched (thanks Jan for reporting this)
Diffstat (limited to 'src/notify.c')
-rwxr-xr-x | src/notify.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/notify.c b/src/notify.c index f258fb8..8eee0d5 100755 --- a/src/notify.c +++ b/src/notify.c @@ -1,4 +1,4 @@ -/* $calcurse: notify.c,v 1.35 2009/01/03 21:32:11 culot Exp $ */ +/* $calcurse: notify.c,v 1.36 2009/01/22 18:11:57 culot Exp $ */ /* * Calcurse - text-based organizer @@ -116,7 +116,8 @@ notify_init_bar (void) void notify_stop_main_thread (void) { - pthread_cancel (notify_t_main); + if (notify_t_main) + pthread_cancel (notify_t_main); } /* |