sc/source/core/data/postit.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
New commits: commit 156506630f8b03c3435d31448eb8bc9613a1d6b8 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Wed Oct 23 01:02:49 2024 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Oct 23 09:24:50 2024 +0200 tdf#163486: PVS: Expression is always true V560 A part of conditional expression is always true: pDrawLayer. Change-Id: Ibcb87390a41d835233625b7bea1e5e040ebe3b21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175457 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Tested-by: Jenkins diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 5316d13b0fa0..fca3a2a1436f 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -786,8 +786,7 @@ void ScPostIt::RemoveCaption() { pDrawPage->RecalcObjOrdNums(); // create drawing undo action (before removing the object to have valid draw page in undo action) - bool bRecording = (pDrawLayer && pDrawLayer->IsRecording()); - if (bRecording) + if (pDrawLayer->IsRecording()) pDrawLayer->AddCalcUndo( std::make_unique<SdrUndoDelObj>( *maNoteData.mxCaption )); // remove the object from the drawing page rtl::Reference<SdrObject> pRemovedObj = pDrawPage->RemoveObject( maNoteData.mxCaption->GetOrdNum() );