Kaydet (Commit) 75a88182 authored tarafından Szymon Kłos's avatar Szymon Kłos

tdf#112634 avoid crash

Change-Id: If4b8b24908eecc8267d7b74810f5afe4b1f79e4d
Reviewed-on: https://gerrit.libreoffice.org/43139Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarSzymon Kłos <szymon.klos@collabora.com>
üst cfce9b41
...@@ -196,7 +196,11 @@ void SwDBTreeList::InitTreeList() ...@@ -196,7 +196,11 @@ void SwDBTreeList::InitTreeList()
for(long i = 0; i < nCount; i++) for(long i = 0; i < nCount; i++)
{ {
OUString sDBName(pDBNames[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()); Select(OUString(), OUString(), OUString());
...@@ -361,11 +365,6 @@ void SwDBTreeList::RequestingChildren(SvTreeListEntry* pParent) ...@@ -361,11 +365,6 @@ void SwDBTreeList::RequestingChildren(SvTreeListEntry* pParent)
} }
} }
} }
else
{
// Defunct connection entry
RemoveEntry(pParent);
}
} }
catch (const Exception&) catch (const Exception&)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment