diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-02-17 10:05:44 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-02-18 09:40:32 +0100 |
commit | ad4d715ca69d6f09fb2d8a713c79edb999ad2316 (patch) | |
tree | b5061e071ecc1fac6341f8a9048fc5078c4a1c68 /dbaccess | |
parent | ddde467cdc60a0373c952c04b5f138ad96ff66e4 (diff) |
Resolves: tdf#140444 return early before null-deref
Change-Id: I85c0d178c3d6e375beb3ad50c4bae9ba0ac29937
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111054
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/app/AppDetailPageHelper.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 02a80d2046d7..4d6b88f79738 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); |