From 0869895063bd528893707cb74c6cf4c461fef066 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sun, 14 Apr 2019 13:58:14 +0300 Subject: tdf#120703 PVS: Silence V522 warnings V522 There might be dereferencing of a potential null pointer. Change-Id: Ie4bc74a734a6d5a73838a27e0d80cc8e51595839 Reviewed-on: https://gerrit.libreoffice.org/70730 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- reportdesign/source/ui/report/ReportController.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'reportdesign/source') diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index d4c823561aa4..5e8e7e7d3b36 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -3470,6 +3470,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) for(i = 0; i < SAL_N_ELEMENTS(pControl); ++i) { pObjs[i] = dynamic_cast(pControl[i].get()); + assert(pObjs[i]); uno::Reference xUnoProp(pObjs[i]->GetUnoControlModel(),uno::UNO_QUERY_THROW); uno::Reference< report::XReportComponent> xShapeProp(pObjs[i]->getUnoShape(),uno::UNO_QUERY_THROW); xUnoProp->setPropertyValue(PROPERTY_NAME,xShapeProp->getPropertyValue(PROPERTY_NAME)); @@ -3541,6 +3542,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) xShapePropLabel->setPosition(aPosLabel); } OUnoObject* pObj = dynamic_cast(pControl[0].get()); + assert(pObj); uno::Reference< report::XFixedText> xShapeProp(pObj->getUnoShape(),uno::UNO_QUERY_THROW); xShapeProp->setName(xShapeProp->getName() + sDefaultName ); -- cgit