diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/comphelper/IdPropArrayHelper.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/comphelper/IdPropArrayHelper.hxx b/include/comphelper/IdPropArrayHelper.hxx index 49c324beab2e..34e403b3ab0a 100644 --- a/include/comphelper/IdPropArrayHelper.hxx +++ b/include/comphelper/IdPropArrayHelper.hxx @@ -100,9 +100,10 @@ namespace comphelper OSL_ENSURE(s_nRefCount, "OIdPropertyArrayUsageHelper::getArrayHelper : suspicious call : have a refcount of 0 !"); ::osl::MutexGuard aGuard(OIdPropertyArrayUsageHelperMutex<TYPE>::get()); // do we have the array already? - if (! (*s_pMap)[nId] ) + auto& rEntry = (*s_pMap)[nId]; + if (!rEntry) { - (*s_pMap)[nId] = createArrayHelper(nId); + rEntry = createArrayHelper(nId); OSL_ENSURE((*s_pMap)[nId], "OIdPropertyArrayUsageHelper::getArrayHelper : createArrayHelper returned nonsense !"); } return (*s_pMap)[nId]; |