summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-02-17 10:05:44 +0000
committerMichael Stahl <michael.stahl@allotropia.de>2021-02-18 11:26:13 +0100
commit6953b18e20d048abc1330b79fc57c395db00bac3 (patch)
tree5513b84fca274ee1e0187786d107d68da0f377c1 /dbaccess
parent97a1d170b5f45c6cf9fc2c56dc4526d0e3f8423a (diff)
Resolves: tdf#140444 return early before null-deref
Change-Id: I85c0d178c3d6e375beb3ad50c4bae9ba0ac29937 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111033 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index cd4d9c6e8b80..0e52b87baf95 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -766,13 +766,15 @@ std::unique_ptr<weld::TreeIter> OAppDetailPageHelper::elementAdded(ElementType _
{
std::unique_ptr<weld::TreeIter> xRet;
DBTreeViewBase* pTreeView = m_aLists[_eType].get();
+ if (!pTreeView)
+ return xRet;
weld::TreeView& rTreeView = pTreeView->GetWidget();
rTreeView.make_unsorted();
- if( _eType == E_TABLE && pTreeView )
+ if (_eType == E_TABLE)
{
xRet = static_cast<OTableTreeListBox&>(pTreeView->getListBox()).addedTable( _rName );
}
- else if ( pTreeView )
+ else
{
std::unique_ptr<weld::TreeIter> xEntry;
Reference<XChild> xChild(_rObject,UNO_QUERY);