diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2017-12-15 12:21:41 +0000 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-12-15 13:26:20 +0100 |
commit | 846bb84d7f517dd9df0eb5b315b77205febbce55 (patch) | |
tree | 9de5d0b8f042ae2ceede9e58da9aae671b9adfde /tools | |
parent | 04abf03ecb18ccf1f805faa763d6f29013efc6bb (diff) |
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@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/rc/resmgr.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
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 ); |