summaryrefslogtreecommitdiff
path: root/mysys/thr_alarm.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/thr_alarm.c')
-rw-r--r--mysys/thr_alarm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c
index f51f27b7f51..564d46aca3a 100644
--- a/mysys/thr_alarm.c
+++ b/mysys/thr_alarm.c
@@ -638,7 +638,8 @@ bool thr_got_alarm(thr_alarm_t *alrm_ptr)
void thr_end_alarm(thr_alarm_t *alrm_ptr)
{
thr_alarm_t alrm= *alrm_ptr;
- if (alrm->crono)
+ /* alrm may be zero if thr_alarm aborted with an error */
+ if (alrm && alrm->crono)
{
KillTimer(NULL, alrm->crono);
alrm->crono = 0;