diff options
Diffstat (limited to 'configmgr/source/lock.cxx')
-rw-r--r-- | configmgr/source/lock.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/configmgr/source/lock.cxx b/configmgr/source/lock.cxx index 9258b35bfeb7..3c0e25d432c5 100644 --- a/configmgr/source/lock.cxx +++ b/configmgr/source/lock.cxx @@ -27,9 +27,7 @@ namespace configmgr { std::shared_ptr<osl::Mutex> const & lock() { - static std::shared_ptr<osl::Mutex> theLock; - if (!theLock.get()) - theLock.reset(new osl::Mutex); + static std::shared_ptr<osl::Mutex> theLock(new osl::Mutex); return theLock; } |