summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-26 09:28:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-26 12:29:01 +0200
commitd86889978d7caa4ac82eb4ede226c7f2561c8607 (patch)
tree4870d9a97ec2ccb0d0b9b66a034e79e5c761b8bc
parentfix also the Win64 tinderboxes (diff)
downloadcore-d86889978d7caa4ac82eb4ede226c7f2561c8607.tar.gz
core-d86889978d7caa4ac82eb4ede226c7f2561c8607.zip
fix leak in ScAcceptChgDlg
Change-Id: I51636d04389c8493377fe906314ef5d8f5c372d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116140 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index f07c7e01a57d..c6137a42d1cd 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -278,6 +278,13 @@ void ScAcceptChgDlg::ClearView()
nAcceptCount=0;
nRejectCount=0;
weld::TreeView& rTreeView = pTheView->GetWidget();
+ rTreeView.selected_foreach(
+ [&rTreeView](weld::TreeIter& rEntry)
+ {
+ ScRedlinData *pEntryData = reinterpret_cast<ScRedlinData*>(rTreeView.get_id(rEntry).toInt64());
+ delete pEntryData;
+ return false;
+ });
rTreeView.freeze();
rTreeView.clear();
rTreeView.thaw();