mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-24 12:34:39 +03:00
Fixes a few instances where nullptrs might be dereferenced
This commit is contained in:
parent
010db431b1
commit
7ebc42c514
@ -2169,7 +2169,7 @@ void PropertyItemAlignChangedCommand::undoIt()
|
|||||||
if (reportItem && (reportItem->property(m_propertyName.toLatin1()) != m_oldValue)) {
|
if (reportItem && (reportItem->property(m_propertyName.toLatin1()) != m_oldValue)) {
|
||||||
reportItem->setProperty(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);
|
reportItem->setPos(m_savedPos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ ReportDesignWidget::ReportDesignWidget(ReportEnginePrivate *report, QMainWindow
|
|||||||
connect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(slotCurrentTabChanged(int)));
|
connect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(slotCurrentTabChanged(int)));
|
||||||
|
|
||||||
//m_instance=this;
|
//m_instance=this;
|
||||||
m_scriptEditor->setPlainText(report->scriptContext()->initScript());
|
m_scriptEditor->setPlainText(m_report->scriptContext()->initScript());
|
||||||
m_zoomer = new GraphicsViewZoomer(activeView());
|
m_zoomer = new GraphicsViewZoomer(activeView());
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
m_defaultFont = QFont("Arial",10);
|
m_defaultFont = QFont("Arial",10);
|
||||||
|
@ -481,9 +481,12 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign
|
|||||||
|
|
||||||
void ReportRender::renderDataBand(BandDesignIntf *dataBand)
|
void ReportRender::renderDataBand(BandDesignIntf *dataBand)
|
||||||
{
|
{
|
||||||
|
if (dataBand == NULL )
|
||||||
|
return;
|
||||||
|
|
||||||
IDataSource* bandDatasource = 0;
|
IDataSource* bandDatasource = 0;
|
||||||
m_lastRenderedFooter = 0;
|
m_lastRenderedFooter = 0;
|
||||||
if (dataBand && !dataBand->datasourceName().isEmpty())
|
if (!dataBand->datasourceName().isEmpty())
|
||||||
bandDatasource = datasources()->dataSource(dataBand->datasourceName());
|
bandDatasource = datasources()->dataSource(dataBand->datasourceName());
|
||||||
|
|
||||||
BandDesignIntf* header = dataBand->bandHeader();
|
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())
|
if (band->reprintOnEachPage())
|
||||||
m_reprintableBands.append(band);
|
m_reprintableBands.append(band);
|
||||||
gb->startGroup(m_datasources);
|
gb->startGroup(m_datasources);
|
||||||
|
Loading…
Reference in New Issue
Block a user