diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-25 22:31:50 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-25 23:31:02 +0300 |
commit | 7ee1d89a656c05b62fa3104b59504afed0037b69 (patch) | |
tree | 7a20e371ba1035fc43135f069407b51d81d15527 /src/utils/mutex.h | |
parent | d49a520d19f28c613c68b574686b182a9c0621be (diff) | |
download | ManaVerse-7ee1d89a656c05b62fa3104b59504afed0037b69.tar.gz ManaVerse-7ee1d89a656c05b62fa3104b59504afed0037b69.tar.bz2 ManaVerse-7ee1d89a656c05b62fa3104b59504afed0037b69.tar.xz ManaVerse-7ee1d89a656c05b62fa3104b59504afed0037b69.zip |
Add missing checks into db directory.
Diffstat (limited to 'src/utils/mutex.h')
-rw-r--r-- | src/utils/mutex.h | 6 |
1 files changed, 4 insertions, 2 deletions
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 |