[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - tools/source
Michael Meeks
michael.meeks at collabora.com
Fri Dec 15 12:30:30 UTC 2017
tools/source/rc/resmgr.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 846bb84d7f517dd9df0eb5b315b77205febbce55
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Fri Dec 15 12:21:41 2017 +0000
Protect resmgr destructor to allow static unique_ptr use.
Otherwise DestroyAllResMgr's from VCL's deinit frees things under us.
Change-Id: I5926af073609c4cc8fc744b55d184a4e17b49096
Reviewed-on: https://gerrit.libreoffice.org/46542
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 31c4765f0304..daea1b5bde64 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -838,6 +838,10 @@ ResMgr::ResMgr( InternalResMgr * pImpMgr )
ResMgr::~ResMgr()
{
+ // our container was freed by DestroyAllResMgr
+ if (!pResMgrMutex)
+ return;
+
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
ResMgrContainer::get().freeResMgr( pImpRes );
More information about the Libreoffice-commits
mailing list