From 4c5ad24111addbf7d171b833da812fe5ba6e36b1 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sun, 21 Oct 2018 11:58:57 +0200 Subject: tdf#120703 (PVS): redundant nullptr check V668 There is no sense in testing the 'm_spNumberFormatterWrapper' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. Change-Id: Id9e89bfcb412c6034ac3c06f67236a77d335c9fc Reviewed-on: https://gerrit.libreoffice.org/62127 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- chart2/source/controller/dialogs/DataBrowser.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'chart2/source/controller') diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index b828828a546f..5e31483aa7c9 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -819,8 +819,7 @@ void DataBrowser::SetDataFromModel( new NumberFormatterWrapper( Reference< util::XNumberFormatsSupplier >( m_xChartDoc, uno::UNO_QUERY ))); - if( m_spNumberFormatterWrapper.get() ) - m_aNumberEditField->SetFormatter( m_spNumberFormatterWrapper->getSvNumberFormatter() ); + m_aNumberEditField->SetFormatter( m_spNumberFormatterWrapper->getSvNumberFormatter() ); RenewTable(); -- cgit