0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-01-11 17:18:10 +03:00

Checking painter before render the report has been added

This commit is contained in:
Arin Alexander 2019-02-01 21:59:37 +03:00
parent 8486d8dd94
commit 14c1b56c83

View File

@ -348,6 +348,10 @@ void ReportEnginePrivate::printReport(ReportPages pages, QPrinter &printer)
} else { } else {
isFirst=false; isFirst=false;
painter = new QPainter(&printer); painter = new QPainter(&printer);
if (!painter->isActive()){
delete painter;
return;
}
} }
QRectF printerPageRect = printer.pageRect(QPrinter::Millimeter); QRectF printerPageRect = printer.pageRect(QPrinter::Millimeter);