sc/source/ui/view/cellsh1.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
New commits: commit 8cb6bdf6279614cd8260d2fffdc6240dcc0f2b63 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Feb 21 12:28:49 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Feb 21 16:21:16 2022 +0100 cid#1500584 Dereference before null check Change-Id: I7d5c0ba027e94d3f085eaacf158a31c525fa7eb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130277 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 7960fc771b2a..9bf7099b9d34 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -3132,9 +3132,7 @@ void ScCellShell::ExecuteDataPilotDialog() pServDlg->GetParPass() ); std::unique_ptr<ScDPObject> pNewDPObject(new ScDPObject(&rDoc)); pNewDPObject->SetServiceData( aServDesc ); - - if ( pNewDPObject ) - pNewDPObject->SetOutRange( aDestPos ); + pNewDPObject->SetOutRange(aDestPos); RunPivotLayoutDialog(pScMod, pTabViewShell, pNewDPObject); } @@ -3157,9 +3155,7 @@ void ScCellShell::ExecuteDataPilotDialog() pDataDlg->GetValues( aImpDesc ); std::unique_ptr<ScDPObject> pNewDPObject(new ScDPObject(&rDoc)); pNewDPObject->SetImportDesc( aImpDesc ); - - if ( pNewDPObject ) - pNewDPObject->SetOutRange( aDestPos ); + pNewDPObject->SetOutRange(aDestPos); RunPivotLayoutDialog(pScMod, pTabViewShell, pNewDPObject); }