diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-09-19 12:27:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-09-19 14:44:04 +0200 |
commit | b092ae051549f9577c8603235515f79ca8af5156 (patch) | |
tree | 6405a5da0090da886bad00803e376ae6d8d3e3f4 /sw/source | |
parent | 1875d8a934bb95a4fb7343dd776845c6606c74bb (diff) |
cid#1492160 Dereference before null check
Change-Id: If53b117a69c37907c4d3871eec6c8b3ecfc9c461
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122314
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/uibase/utlui/glbltree.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 81c351f7249a..3594c0a198ab 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -793,12 +793,9 @@ void SwGlobalTree::UpdateTracking() if (pActiveShellCurrSection) { const SwSection* pSection = pActiveShellCurrSection; - SwSection* pParent; - while ((pParent = pSection->GetParent()) != nullptr) + while (SwSection* pParent = pSection->GetParent()) pSection = pParent; - - if (pSection) - m_xTreeView->select_text(pSection->GetSectionName()); + m_xTreeView->select_text(pSection->GetSectionName()); } } |