diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-24 16:38:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-10-24 18:53:54 +0200 |
commit | 9efc7e6980e3ada86bfd501fc7306f596abccbf5 (patch) | |
tree | da37ce0b4a95faebd1370ee63272c96a2e03e8f1 | |
parent | 8dfa16a715cf6857c834e017324e995250544ee6 (diff) |
cid#1460971 Unchecked return value
Change-Id: Ic60242072a0ba7037cd8094ae98633b038c6f1eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124120
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index c56a7fca4d83..b16599d5e960 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2766,7 +2766,11 @@ bool SwContentTree::HasContentChanged() std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator(xRootEntry.get())); for (size_t j = 0; j < nChildCount; ++j) { - m_xTreeView->iter_next(*xEntry); + if (!m_xTreeView->iter_next(*xEntry)) + { + SAL_WARN("sw.ui", "unexpected missing entry"); + break; + } const SwContent* pCnt = pArrType->GetMember(j); OUString sSubId(OUString::number(reinterpret_cast<sal_Int64>(pCnt))); m_xTreeView->set_id(*xEntry, sSubId); |