From 942da982ca249b6b9e93f638fc88bda87b22f833 Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Sat, 8 Apr 2017 09:42:08 -0400 Subject: [PATCH] Ensure we aren't returning data that has been deleted by setting the pointer to NULL. --- limereport/lrreportrender.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp index 8d2ccb6..1b31b4f 100644 --- a/limereport/lrreportrender.cpp +++ b/limereport/lrreportrender.cpp @@ -442,6 +442,7 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign BandDesignIntf* upperPart = dynamic_cast(bandClone->cloneUpperPart(m_maxHeightByColumn[m_currentColumn])); registerBand(upperPart); delete bandClone; + bandClone = NULL; } } else { @@ -459,6 +460,7 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign BandDesignIntf* upperPart = dynamic_cast(bandClone->cloneUpperPart(m_maxHeightByColumn[m_currentColumn])); registerBand(upperPart); delete bandClone; + bandClone = NULL; }; } else { bandClone->setHeight(m_maxHeightByColumn[m_currentColumn]);