From 14c1b56c83583a08eb26a942b8ce2422f0c97ae9 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Fri, 1 Feb 2019 21:59:37 +0300 Subject: [PATCH] Checking painter before render the report has been added --- limereport/lrreportengine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index 0cd8628..b45fcdd 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -348,6 +348,10 @@ void ReportEnginePrivate::printReport(ReportPages pages, QPrinter &printer) } else { isFirst=false; painter = new QPainter(&printer); + if (!painter->isActive()){ + delete painter; + return; + } } QRectF printerPageRect = printer.pageRect(QPrinter::Millimeter);