[Libreoffice-commits] core.git: sw/source

Szymon Kłos szymon.klos at collabora.com
Wed Sep 27 08:26:28 UTC 2017


 sw/source/core/doc/docnew.cxx   |    1 +
 sw/source/uibase/dbui/dbmgr.cxx |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 79a425900e31bda83cde1bee150c1234931cb8bd
Author: Szymon Kłos <szymon.klos at collabora.com>
Date:   Mon Sep 25 19:04:05 2017 +0200

    tdf#112634 Don't remove embedded database before close
    
    Change-Id: Iaa60160d40b0f7b5dceba319bc3813d124c34cc1
    Reviewed-on: https://gerrit.libreoffice.org/42762
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 86e5085692c8..8fa20bd5df18 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -524,6 +524,7 @@ SwDoc::~SwDoc()
         // Remove the revoke listener here first, so that we don't remove the data source from the document.
         mpDBManager->releaseRevokeListener();
         SwDBManager::RevokeDataSource(maDBData.sDataSource);
+        SwDBManager::RevokeDataSource(mpDBManager->getEmbeddedName());
     }
     else if (!mpDBManager->getEmbeddedName().isEmpty())
     {
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 1c3d6a56679f..483ffd686a0e 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -3221,7 +3221,7 @@ void SwDBManager::CommitLastRegistrations()
 {
     for (auto aIt = m_aUncommitedRegistrations.begin(); aIt != m_aUncommitedRegistrations.end();)
     {
-        if (aIt->first == m_pDoc->GetDocShell())
+        if (aIt->first == m_pDoc->GetDocShell() || aIt->first == nullptr)
         {
             m_aNotUsedConnections.push_back(aIt->second);
             aIt = m_aUncommitedRegistrations.erase(aIt);


More information about the Libreoffice-commits mailing list