tools/source/rc/resmgr.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 846bb84d7f517dd9df0eb5b315b77205febbce55
Author: Michael Meeks <[email protected]>
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 <[email protected]>
    Tested-by: Jan Holesovsky <[email protected]>

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 );
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to