[Libreoffice-commits] core.git: chart2/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Oct 21 13:25:05 UTC 2018


 chart2/source/controller/dialogs/DataBrowser.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 4c5ad24111addbf7d171b833da812fe5ba6e36b1
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Oct 21 11:58:57 2018 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Oct 21 15:24:43 2018 +0200

    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 <mike.kaganski at collabora.com>

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();
 


More information about the Libreoffice-commits mailing list