diff options
author | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-08-06 14:28:48 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-08-06 14:28:48 +0800 |
commit | 634ee40f05b1edfc841761f2f1f73be5625c86f6 (patch) | |
tree | 69a82d3949a8b6a4d61452f96fba9a5969391c00 /calendar/gui | |
parent | 771c2a1f0266331a9b9250ee391fca88dd545b66 (diff) | |
download | gsoc2013-evolution-634ee40f05b1edfc841761f2f1f73be5625c86f6.tar gsoc2013-evolution-634ee40f05b1edfc841761f2f1f73be5625c86f6.tar.gz gsoc2013-evolution-634ee40f05b1edfc841761f2f1f73be5625c86f6.tar.bz2 gsoc2013-evolution-634ee40f05b1edfc841761f2f1f73be5625c86f6.tar.lz gsoc2013-evolution-634ee40f05b1edfc841761f2f1f73be5625c86f6.tar.xz gsoc2013-evolution-634ee40f05b1edfc841761f2f1f73be5625c86f6.tar.zst gsoc2013-evolution-634ee40f05b1edfc841761f2f1f73be5625c86f6.zip |
** Fix for bug #454253
svn path=/trunk/; revision=33952
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/alarm-notify/alarm.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c index b360075d13..13dca9ca77 100644 --- a/calendar/gui/alarm-notify/alarm.c +++ b/calendar/gui/alarm-notify/alarm.c @@ -56,7 +56,10 @@ pop_alarm (void) AlarmRecord *ar; GList *l; - g_assert (alarms != NULL); + if (!alarms) { + g_warning ("Nothing to pop from the alarm queue"); + return; + } ar = alarms->data; @@ -72,7 +75,11 @@ alarm_ready_cb (gpointer data) { time_t now; - g_assert (alarms != NULL); + if (!alarms) { + g_warning ("Alarm triggered, but no alarm present\n"); + return FALSE; + } + timeout_id = 0; now = time (NULL); @@ -120,7 +127,11 @@ setup_timeout (void) const AlarmRecord *ar; guint diff; time_t now; - g_assert (alarms != NULL); + + if (!alarms) { + g_warning ("No alarm to setup\n"); + return; + } ar = alarms->data; @@ -273,15 +284,19 @@ alarm_done (void) GList *l; if (timeout_id == 0) { - g_assert (alarms == NULL); + if (alarms) + g_warning ("No timeout, but queue is not NULL\n"); return; } - g_assert (alarms != NULL); - g_source_remove (timeout_id); timeout_id = 0; + if (!alarms) { + g_warning ("timeout present, freed, but no alarms active\n"); + return; + } + for (l = alarms; l; l = l->next) { AlarmRecord *ar; |