summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-26 08:57:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-26 10:55:15 +0200
commit31589c106fe83a74560adcc6396d70687ca352cb (patch)
tree84d499d263c536febcbb991c17492121efe414d4 /sw/source/uibase
parentb161daeccf299afefeaf319ee9b6f50e6f888eff (diff)
fix leak in SwRedlineAcceptDlg
Change-Id: I905d394db9339efda77e4f014e795c4f2d5f4584 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index a6503b588549..a4937241fe00 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -201,6 +201,18 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(const std::shared_ptr<weld::Window>& rPar
SwRedlineAcceptDlg::~SwRedlineAcceptDlg()
{
+ weld::TreeView& rTreeView = m_pTable->GetWidget();
+ rTreeView.all_foreach(
+ [&rTreeView](weld::TreeIter& rEntry)
+ {
+ if (!rTreeView.get_iter_depth(rEntry))
+ {
+ RedlinData *pData = reinterpret_cast<RedlinData*>(rTreeView.get_id(rEntry).toInt64());
+ delete pData;
+ }
+ return false;
+ }
+ );
}
void SwRedlineAcceptDlg::Init(SwRedlineTable::size_type nStart)