From 322ded365910712d1efa108686689d19f46834a4 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Fri, 3 Mar 2017 01:12:29 +0300 Subject: [PATCH] Null pointer access has been fixed --- limereport/lrscriptenginemanager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp index f69283b..f8d157d 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -520,8 +520,11 @@ QString ScriptEngineManager::expandDataFields(QString context, ExpandType expand context.replace(rx.cap(0),fieldValue); } else { - QString error = QString("Field %1 not found in %2 !!! ").arg(field).arg(reportItem->objectName()); - dataManager()->putError(error); + QString error; + if (reportItem){ + error = QString("Field %1 not found in %2 !!! ").arg(field).arg(reportItem->objectName()); + dataManager()->putError(error); + } varValue = QVariant(); if (!dataManager()->reportSettings() || !dataManager()->reportSettings()->suppressAbsentFieldsAndVarsWarnings()) context.replace(rx.cap(0),error);