summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-18 10:29:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-19 00:00:54 +0200
commit7037fe070ba81fb3dd8dfc03a7ddeb5090b2288f (patch)
tree85363b33ae3924307b87f0e921d670142ada872f /sc
parentfa7ca0a1c7f899f9df09e96ffe7f7bb3f48c850f (diff)
cid#1448287 Unchecked return value
Change-Id: Ifd6bd0f4218805ad52a256fad82a4d2455c6afa9 Reviewed-on: https://gerrit.libreoffice.org/75871 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 44d89d2669be..3b381cd51e36 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -1397,14 +1397,14 @@ void ScAcceptChgDlg::AppendChanges(const ScChangeTrack* pChanges,sal_uLong nStar
void ScAcceptChgDlg::RemoveEntries(sal_uLong nStartAction,sal_uLong nEndAction)
{
weld::TreeView& rTreeView = pTheView->GetWidget();
- rTreeView.freeze();
ScRedlinData *pEntryData=nullptr;
std::unique_ptr<weld::TreeIter> xEntry(rTreeView.make_iterator());
if (rTreeView.get_cursor(xEntry.get()))
pEntryData = reinterpret_cast<ScRedlinData*>(rTreeView.get_id(*xEntry).toInt64());
- rTreeView.get_iter_first(*xEntry);
+ if (!rTreeView.get_iter_first(*xEntry))
+ return;
sal_uLong nAction=0;
if (pEntryData)
@@ -1428,6 +1428,8 @@ void ScAcceptChgDlg::RemoveEntries(sal_uLong nStartAction,sal_uLong nEndAction)
}
while (rTreeView.iter_next(*xEntry));
+ rTreeView.freeze();
+
// MUST do it backwards, don't delete parents before children and GPF
for (auto it = aIdsToRemove.rbegin(); it != aIdsToRemove.rend(); ++it)
rTreeView.remove_id(*it);