summaryrefslogtreecommitdiff
path: root/include/comphelper/proparrhlp.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/comphelper/proparrhlp.hxx')
-rw-r--r--include/comphelper/proparrhlp.hxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/comphelper/proparrhlp.hxx b/include/comphelper/proparrhlp.hxx
index 77fa9e1b9714..9093ff579f0c 100644
--- a/include/comphelper/proparrhlp.hxx
+++ b/include/comphelper/proparrhlp.hxx
@@ -112,14 +112,11 @@ template <class TYPE>
::cppu::IPropertyArrayHelper* OPropertyArrayUsageHelper<TYPE>::getArrayHelper()
{
OSL_ENSURE(s_nRefCount, "OPropertyArrayUsageHelper::getArrayHelper : suspicious call : have a refcount of 0 !");
+ std::unique_lock aGuard(theMutex());
if (!s_pProps)
{
- std::unique_lock aGuard(theMutex());
- if (!s_pProps)
- {
- s_pProps = createArrayHelper();
- OSL_ENSURE(s_pProps, "OPropertyArrayUsageHelper::getArrayHelper : createArrayHelper returned nonsense !");
- }
+ s_pProps = createArrayHelper();
+ OSL_ENSURE(s_pProps, "OPropertyArrayUsageHelper::getArrayHelper : createArrayHelper returned nonsense !");
}
return s_pProps;
}