diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-11-14 13:25:32 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-11-14 16:21:34 +0100 |
commit | 19e1cf2d1c83586c0444d7eb0a23128706262f28 (patch) | |
tree | 93fd0ba245f6218de3cb44a67bdddd02650902af /sw/source | |
parent | c8afec430a8156e524043e10e8bc81dd5e69bc5d (diff) |
tdf#163486: PVS: redundant nullptr check
V668 There is no sense in testing the 'pUndo' 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: I3eeff673f5c0862e0b3c7f0a5338ddb0882ab31d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176594
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/uibase/shells/basesh.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 25a4465f30b0..d5c0a4eac9f3 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -3066,8 +3066,7 @@ static void InsertTableImpl(SwWrtShell& rSh, { pTableNode->GetTable().SetTableStyleName( aAutoName ); SwUndoTableAutoFormat* pUndo = new SwUndoTableAutoFormat( *pTableNode, *pTAFormat ); - if ( pUndo ) - rSh.GetIDocumentUndoRedo().AppendUndo( std::unique_ptr<SwUndo>(pUndo) ); + rSh.GetIDocumentUndoRedo().AppendUndo( std::unique_ptr<SwUndo>(pUndo) ); } } |