diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-03-28 20:55:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-03-29 10:21:10 +0200 |
commit | 1f83834bd0d78232762f7467a65ebdf0d4b9f7fa (patch) | |
tree | 437074a4c60f9b6f4a78baf29e55ab7f8522b5a1 /sw | |
parent | 890b0482641bccd8281e4a952e8b8fe26fc745bd (diff) |
cid#1503286 Unchecked return value
Change-Id: I701039be73405e354fc64bd6a81999aff44e9e0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132244
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index fa5e28167be0..36f7801f375a 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -4532,7 +4532,8 @@ IMPL_LINK_NOARG(SwContentTree, SelectHdl, weld::TreeView&, void) return; // Select the content type in the Navigate By control std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator()); - m_xTreeView->get_selected(xEntry.get()); + if (!m_xTreeView->get_selected(xEntry.get())) + return; while (m_xTreeView->get_iter_depth(*xEntry)) m_xTreeView->iter_parent(*xEntry); m_pDialog->SelectNavigateByContentType(m_xTreeView->get_text(*xEntry)); |