[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sw/source

Szymon Kłos szymon.klos at collabora.com
Sat Oct 7 10:39:05 UTC 2017


 sw/source/uibase/dbui/dbtree.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit d9f9e28648168d721ecdc70b0252f67b7d3b68fd
Author: Szymon Kłos <szymon.klos at collabora.com>
Date:   Wed Oct 4 20:53:27 2017 +0200

    tdf#112634 avoid crash
    
    Change-Id: If4b8b24908eecc8267d7b74810f5afe4b1f79e4d
    Reviewed-on: https://gerrit.libreoffice.org/43139
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    (cherry picked from commit 75a881829f19439245cdb859fc16d59461992f79)
    Reviewed-on: https://gerrit.libreoffice.org/43153
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index 8ff07ac75b37..e3ceba10692a 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -195,7 +195,11 @@ void SwDBTreeList::InitTreeList()
     for(long i = 0; i < nCount; i++)
     {
         OUString sDBName(pDBNames[i]);
-        InsertEntry(sDBName, aImg, aImg, nullptr, true);
+        Reference<XConnection> xConnection = pImpl->GetConnection(sDBName);
+        if (xConnection.is())
+        {
+            InsertEntry(sDBName, aImg, aImg, nullptr, true);
+        }
     }
     OUString sDBName(sDefDBName.getToken(0, DB_DELIM));
     OUString sTableName(sDefDBName.getToken(1, DB_DELIM));


More information about the Libreoffice-commits mailing list