summaryrefslogtreecommitdiff
path: root/mysys/thr_alarm.c
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-11-17 12:59:07 +0200
committerunknown <monty@mashka.mysql.fi>2003-11-17 12:59:07 +0200
commitb57a1dd22731b436c52bddd2fe4f368429ebb59c (patch)
treeb96141c19ab5d71bd011eabb282e32bfe27af863 /mysys/thr_alarm.c
parent409b8f35d43a23b660bc5a5f439a3375d2c20d36 (diff)
downloadmariadb-git-b57a1dd22731b436c52bddd2fe4f368429ebb59c.tar.gz
Safety fix for alarms on windows.
mysys/thr_alarm.c: Safety fix for alarms on windows sql/mini_client.cc: Added comments
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;