summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-21 11:46:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-21 12:28:23 +0100
commit48314f25241e014a634dd5371543b90137ffd2bc (patch)
treec55d6ef485fee3941bc1d3becb106d0dd77e7f2f /cppuhelper
parente41667762bfff43f95d1ee71b2d67903e4fdab4e (diff)
improve function-local statics in basic..cui
Change-Id: If737e8478f6f1c8fffb060ce132d80e0f07ef8ee Reviewed-on: https://gerrit.libreoffice.org/63701 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/weak.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index cd3fa5e48dfc..d93cf4d0a7a8 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -40,9 +40,7 @@ namespace cppu
// this is used to lock all instances of OWeakConnectionPoint and OWeakRefListener as well as OWeakObject::m_pWeakConnectionPoint
static Mutex & getWeakMutex()
{
- static Mutex * s_pMutex = nullptr;
- if (! s_pMutex)
- s_pMutex = new Mutex();
+ static Mutex * s_pMutex = new Mutex();
return *s_pMutex;
}