From 7ee1d89a656c05b62fa3104b59504afed0037b69 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 25 Jun 2015 22:31:50 +0300 Subject: Add missing checks into db directory. --- src/utils/mutex.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/utils/mutex.h') diff --git a/src/utils/mutex.h b/src/utils/mutex.h index 7fe3ad69c..d715dddad 100644 --- a/src/utils/mutex.h +++ b/src/utils/mutex.h @@ -90,12 +90,14 @@ inline void Mutex::unlock() inline MutexLocker::MutexLocker(Mutex *const mutex) : mMutex(mutex) { - mMutex->lock(); + if (mMutex) + mMutex->lock(); } inline MutexLocker::~MutexLocker() { - mMutex->unlock(); + if (mMutex) + mMutex->unlock(); } #endif // UTILS_MUTEX_H -- cgit v1.2.3-60-g2f50