diff options
author | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2022-06-15 16:54:55 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-06-24 13:42:27 +0200 |
commit | 3ce245e71289de7dad26bb03e2f3b9952ca123b6 (patch) | |
tree | 8ed43557b8658de47b72e59b9789a1bd3a4f3063 /vcl | |
parent | 47b4afb244ed5ad3a38e481993853dab3a3d7f45 (diff) |
Make sure pEntry is not null
Crash seen:
> mergedlo.dll!SvTreeList::GetDepth(const SvTreeListEntry * pEntry) line 106
mergedlo.dll!SalInstanceTreeView::get_iter_depth(const weld::TreeIter & rIter) line 4230
basctllo.dll!basctl::SbTreeListBox::FindVariable(const weld::TreeIter * pEntry) line 271
basctllo.dll!basctl::SbTreeListBox::FindModule(const weld::TreeIter * pEntry) line 695
basctllo.dll!basctl::MacroChooser::BasicSelectHdl(weld::TreeView & __formal) line 473
basctllo.dll!basctl::MacroChooser::RestoreMacroDescription() line 158
basctllo.dll!basctl::MacroChooser::run() line 178
Change-Id: Ic85758c0bbee952d0a23b1d52e8bbdd231e8de26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135914
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
(cherry picked from commit 21747f8ef471080817db464a91ef203813e84677)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135938
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/treelist/treelist.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx index 9c111bf99893..54ebcb075e92 100644 --- a/vcl/source/treelist/treelist.cxx +++ b/vcl/source/treelist/treelist.cxx @@ -103,7 +103,7 @@ sal_uInt16 SvTreeList::GetDepth( const SvTreeListEntry* pEntry ) const { DBG_ASSERT(pEntry && pEntry!=pRootItem.get(),"GetDepth:Bad Entry"); sal_uInt16 nDepth = 0; - while( pEntry->pParent != pRootItem.get() ) + while( pEntry && pEntry->pParent != pRootItem.get() ) { nDepth++; pEntry = pEntry->pParent; |