summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-22 11:58:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-23 06:46:13 +0200
commitb71e02dd5bfaaa490dc7f56eddf10c17681108b5 (patch)
treeb406df81dd38fd967d3b900db6e034f1a15b50ee /reportdesign
parent8f98a7c4e5b1f0b249c026577805a378b8a533d5 (diff)
dispose() methods should clear their smart pointers
especiall the ref-counted ones Change-Id: Ib3bb029043b1b923010ef4a47bfc377e1f569da7 Reviewed-on: https://gerrit.libreoffice.org/76102 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx2
-rw-r--r--reportdesign/source/ui/report/SectionWindow.cxx2
2 files changed, 4 insertions, 0 deletions
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 20cb5428e5c4..880a68f7b59c 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -118,9 +118,11 @@ void OReportSection::dispose()
m_pPage = nullptr;
if ( m_pMulti.is() )
m_pMulti->dispose();
+ m_pMulti.clear();
if ( m_pReportListener.is() )
m_pReportListener->dispose();
+ m_pReportListener.clear();
m_pFunc.reset();
{
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index 3cc789fea738..cc16aedf9d59 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -108,8 +108,10 @@ void OSectionWindow::dispose()
{
if ( m_pSectionMulti.is() )
m_pSectionMulti->dispose();
+ m_pSectionMulti.clear();
if ( m_pGroupMulti.is() )
m_pGroupMulti->dispose();
+ m_pGroupMulti.clear();
}
catch (uno::Exception&)
{