dbaccess/source/ui/app/AppDetailPageHelper.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit ad4d715ca69d6f09fb2d8a713c79edb999ad2316 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Feb 17 10:05:44 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Feb 18 09:40:32 2021 +0100 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 <caol...@redhat.com> 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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits