summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-05-22 12:11:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-05-22 15:16:12 +0200
commit5de1567e30d54fde33875d7c8301bf3d36d6f1cd (patch)
treea2297c519f6e6c24dad1e96c5815c0d55eb25c80 /sc
parentc4a8484bd6eb9c490b7af8c6aa1c25f05a3cfb5e (diff)
cid#1504539 Dereference before null check
seeing as its always derefed before here, the null check isn't useful Change-Id: I7c50d357978c7468eec469b4f32601e9b99e07e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134728 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 162e8ceb9565..dfd11971e88f 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -1260,7 +1260,7 @@ void ScDataPilotTableObj::Refreshed_Impl()
ScDataPilotDescriptor::ScDataPilotDescriptor(ScDocShell* pDocSh) :
ScDataPilotDescriptorBase( pDocSh ),
- mpDPObject(new ScDPObject(pDocSh ? &pDocSh->GetDocument() : nullptr) )
+ mpDPObject(new ScDPObject(&pDocSh->GetDocument()))
{
ScDPSaveData aSaveData;
// set defaults like in ScPivotParam constructor
@@ -1269,7 +1269,7 @@ ScDataPilotDescriptor::ScDataPilotDescriptor(ScDocShell* pDocSh) :
aSaveData.SetIgnoreEmptyRows( false );
aSaveData.SetRepeatIfEmpty( false );
mpDPObject->SetSaveData(aSaveData);
- ScSheetSourceDesc aSheetDesc(pDocSh ? &pDocSh->GetDocument() : nullptr);
+ ScSheetSourceDesc aSheetDesc(&pDocSh->GetDocument());
mpDPObject->SetSheetDesc(aSheetDesc);
}