summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx7
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());
}
}