sc/source/filter/oox/extlstcontext.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 954f061b93c9b8bc441af498dc19aaa1afcba791
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Oct 18 00:51:11 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Oct 18 08:45:23 2024 +0200

    tdf#163486: PVS: redundant nullptr check
    
    V668    There is no sense in testing the 'pInfo' 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: Ie6a701c8fd8d6a0386e83012d59389edaccea93e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175109
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/filter/oox/extlstcontext.cxx 
b/sc/source/filter/oox/extlstcontext.cxx
index 5bdfd1943b4e..80e0b8ef53d2 100644
--- a/sc/source/filter/oox/extlstcontext.cxx
+++ b/sc/source/filter/oox/extlstcontext.cxx
@@ -170,12 +170,9 @@ ContextHandlerRef 
ExtConditionalFormattingContext::onCreateContext(sal_Int32 nEl
             if (aExt == getExtLst().end())
             {
                 pInfo = new ScDataBarFormatData();
-                if (pInfo)
-                {
-                    auto pFormat = 
std::make_unique<ScDataBarFormat>(&getScDocument());
-                    pFormat->SetDataBarData(pInfo);
-                    
getCondFormats().importExtFormatEntries().push_back(std::move(pFormat));
-                }
+                auto pFormat = 
std::make_unique<ScDataBarFormat>(&getScDocument());
+                pFormat->SetDataBarData(pInfo);
+                
getCondFormats().importExtFormatEntries().push_back(std::move(pFormat));
             }
             else
             {

Reply via email to