From 7c64caec3022b28775ea85864eef47bf2ac51066 Mon Sep 17 00:00:00 2001 From: Dag Andersen Date: Mon, 22 Aug 2016 08:49:13 +0200 Subject: [PATCH 65/80] Backport: Plan: Fix crash due to accessing deleted object KReportDesigner takes ownership of reportdata, so give it a clone it can delete --- plan/libs/ui/reports/reportview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plan/libs/ui/reports/reportview.cpp b/plan/libs/ui/reports/reportview.cpp index 462a31d..8552790 100644 --- a/plan/libs/ui/reports/reportview.cpp +++ b/plan/libs/ui/reports/reportview.cpp @@ -1250,10 +1250,10 @@ void ReportDesigner::createDockers() void ReportDesigner::setReportData( const QString &tag ) { - + emit optionsModified(); ReportData *rd = Report::findReportData( m_reportdatamodels, tag ); - if ( rd != m_designer->reportData() ) { - emit optionsModified(); + if ( rd ) { + rd = rd->clone(); // KReportDesigner takes ownership, so give it a clone it can delete } m_designer->setReportData( rd ); -- 2.7.4