diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-22 17:15:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-22 17:15:43 +0000 |
commit | dcd07731c8741c6308812ea789925bdfda7c41db (patch) | |
tree | 0f6791c5e03b6b35b799e0beebb33dc73100efc6 /sc | |
parent | c2d6d947a2b5fc76dfb0ad5d880cc943f2dd8269 (diff) |
coverity#705471 Dereference null return value
Change-Id: I7706744e046d0c641300a9d9167d89f00acacd62
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/unoobj/dapiuno.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index 48fdf5ebb2c4..9af780d25144 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -1296,11 +1296,14 @@ void SAL_CALL ScDataPilotTableObj::insertDrillDownSheet(const CellAddress& aAddr ScDPObject* pDPObj = GetDPObject(); if (!pDPObj) throw RuntimeException(); + ScTabViewShell* pViewSh = GetDocShell()->GetBestViewShell(); + if (!pViewSh) + throw RuntimeException(); Sequence<DataPilotFieldFilter> aFilters; pDPObj->GetDataFieldPositionData( ScAddress(static_cast<SCCOL>(aAddr.Column), static_cast<SCROW>(aAddr.Row), aAddr.Sheet), aFilters); - GetDocShell()->GetBestViewShell()->ShowDataPilotSourceData(*pDPObj, aFilters); + pViewSh->ShowDataPilotSourceData(*pDPObj, aFilters); } CellRangeAddress SAL_CALL ScDataPilotTableObj::getOutputRangeByType( sal_Int32 nType ) |