summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2017-10-04 20:53:27 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2017-10-05 08:14:01 +0200
commit75a881829f19439245cdb859fc16d59461992f79 (patch)
tree3e0f18ca6105a99cae015707f8309bb33861a623
parentcfce9b418072ff930d400890dcc0781e919fce24 (diff)
tdf#112634 avoid crash
Change-Id: If4b8b24908eecc8267d7b74810f5afe4b1f79e4d Reviewed-on: https://gerrit.libreoffice.org/43139 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r--sw/source/uibase/dbui/dbtree.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index 221527a3db90..a4f058fb7ece 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -196,7 +196,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);
+ }
}
Select(OUString(), OUString(), OUString());
@@ -361,11 +365,6 @@ void SwDBTreeList::RequestingChildren(SvTreeListEntry* pParent)
}
}
}
- else
- {
- // Defunct connection entry
- RemoveEntry(pParent);
- }
}
catch (const Exception&)
{