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 | |
parent | 38912b36daf4fe23436080b155a7b5a52ad2db7d (diff) | |
download | calcurse-d8861f877ec1e52ff03781fa2246e7343a9387ae.zip |
bugfix: avoid possible segfault if notify_stop_main_thread is called before thread was launched (thanks Jan for reporting this)
-rwxr-xr-x | ChangeLog | 8 | ||||
-rwxr-xr-x | configure.ac | 4 | ||||
-rwxr-xr-x | src/notify.c | 5 |
3 files changed, 13 insertions, 4 deletions
@@ -1,3 +1,11 @@ +2009-01-22 Frederic Culot <frederic@culot.org> + + * src/notify.c (notify_stop_main_thread): avoid a possible + segfault if this function is called before the thread was launched + (thanks Jan for reporting this) + + * configure.ac: switch to 2.5_beta + 2009-01-05 Frederic Culot <frederic@culot.org> * src/custom.c (custom_general_config, print_general_options): diff --git a/configure.ac b/configure.ac index 678b25e..815a993 100755 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,10 @@ -# $calcurse: configure.ac,v 1.28 2008/12/28 13:13:59 culot Exp $ +# $calcurse: configure.ac,v 1.29 2009/01/22 18:11:56 culot Exp $ #------------------------------------------------------------------------------- # Init #------------------------------------------------------------------------------- AC_PREREQ(2.59) -AC_INIT(calcurse, 2.4, frederic@culot.org) +AC_INIT(calcurse, 2.5_beta, frederic@culot.org) AM_INIT_AUTOMAKE AM_GNU_GETTEXT([external]) AC_CONFIG_SRCDIR([src/calcurse.c]) 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); } /* |