mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-25 09:04:39 +03:00
Merge pull request #65 from asmaloney/fix-potential-nullptr-use
Fixes a few instances where nullptrs might be dereferenced
This commit is contained in:
commit
79e70adf00
@ -2171,7 +2171,7 @@ void PropertyItemAlignChangedCommand::undoIt()
|
||||
if (reportItem && (reportItem->property(m_propertyName.toLatin1()) != m_oldValue)) {
|
||||
reportItem->setProperty(m_propertyName.toLatin1(), m_oldValue);
|
||||
}
|
||||
if (m_oldValue == BaseDesignIntf::DesignedItemAlign){
|
||||
if (reportItem && (m_oldValue == BaseDesignIntf::DesignedItemAlign)){
|
||||
reportItem->setPos(m_savedPos);
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ ReportDesignWidget::ReportDesignWidget(ReportEnginePrivate *report, QMainWindow
|
||||
connect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(slotCurrentTabChanged(int)));
|
||||
|
||||
//m_instance=this;
|
||||
m_scriptEditor->setPlainText(report->scriptContext()->initScript());
|
||||
m_scriptEditor->setPlainText(m_report->scriptContext()->initScript());
|
||||
m_zoomer = new GraphicsViewZoomer(activeView());
|
||||
#ifdef Q_OS_WIN
|
||||
m_defaultFont = QFont("Arial",10);
|
||||
|
@ -481,9 +481,12 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign
|
||||
|
||||
void ReportRender::renderDataBand(BandDesignIntf *dataBand)
|
||||
{
|
||||
if (dataBand == NULL )
|
||||
return;
|
||||
|
||||
IDataSource* bandDatasource = 0;
|
||||
m_lastRenderedFooter = 0;
|
||||
if (dataBand && !dataBand->datasourceName().isEmpty())
|
||||
if (!dataBand->datasourceName().isEmpty())
|
||||
bandDatasource = datasources()->dataSource(dataBand->datasourceName());
|
||||
|
||||
BandDesignIntf* header = dataBand->bandHeader();
|
||||
@ -691,7 +694,7 @@ void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* da
|
||||
// }
|
||||
}
|
||||
|
||||
if (!gb->isStarted()){
|
||||
if (gb && !gb->isStarted()){
|
||||
if (band->reprintOnEachPage())
|
||||
m_reprintableBands.append(band);
|
||||
gb->startGroup(m_datasources);
|
||||
|
Loading…
Reference in New Issue
Block a user