summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysys/thr_lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index c798c8595e7..07ba1ec9eac 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -468,7 +468,7 @@ void thr_lock_delete(THR_LOCK *lock)
void thr_lock_info_init(THR_LOCK_INFO *info, struct st_my_thread_var *tmp)
{
- if (tmp)
+ if (!tmp)
tmp= my_thread_var;
info->thread= tmp->pthread_self;
info->thread_id= tmp->id;