Ensure we aren't returning data that has been deleted by setting the pointer to NULL.

This commit is contained in:
Andy Maloney 2017-04-08 09:42:08 -04:00
parent 010db431b1
commit 942da982ca

View File

@ -442,6 +442,7 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign
BandDesignIntf* upperPart = dynamic_cast<BandDesignIntf*>(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<BandDesignIntf*>(bandClone->cloneUpperPart(m_maxHeightByColumn[m_currentColumn]));
registerBand(upperPart);
delete bandClone;
bandClone = NULL;
};
} else {
bandClone->setHeight(m_maxHeightByColumn[m_currentColumn]);