summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-03-08 12:07:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-03-08 19:54:26 +0000
commitee5f8b0bb59f974293a1810b5163ecc0cab6cc09 (patch)
tree731cff60b7047050a4cc650d31101ba2b8a12fb3 /sw/source/uibase
parentfa0f8dd9d3dcbbee2d8c23341981635f9c55e55f (diff)
cid#1521854 Unchecked return value
Change-Id: I2636790165b2fc0d535d4b8648e16751a0b69e23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148470 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/uiview/view2.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index fea09391a051..48f38beb99f7 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1243,8 +1243,8 @@ void SwView::Execute(SfxRequest &rReq)
const SwTOXBase* pBase = m_pWrtShell->GetCurTOX();
if( !pBase )
{
- m_pWrtShell->GotoNextTOXBase();
- pBase = m_pWrtShell->GetCurTOX();
+ if (m_pWrtShell->GotoNextTOXBase())
+ pBase = m_pWrtShell->GetCurTOX();
}
bool bAutoMarkApplied = false;