diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-08-31 12:46:54 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-08-31 12:49:15 -0400 |
commit | b4f913b5f5c48335dc80a5322b078e1d6ac2e3fe (patch) | |
tree | a2681ad36563b8224fc23f4a0ba4150fc83a8dc6 /sc | |
parent | ec5fb295b0fcbb334707bc6e33c9a77bae34737b (diff) |
fdo#54303: Prevent crash on load.
Another simple null pointer check, to save the day.
This unfortunately prevents the properties of the skipped field from
being loaded properly, but it's still better than a immediate crash.
Change-Id: I49398d80eb3bf0834b7e9830ac8be3ac776cb354
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xipivot.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx index 2d30efb0d35e..8f9596a8a067 100644 --- a/sc/source/filter/excel/xipivot.cxx +++ b/sc/source/filter/excel/xipivot.cxx @@ -1091,7 +1091,11 @@ ScDPSaveDimension* XclImpPTField::ConvertRCPField( ScDPSaveData& rSaveData ) con if( !pCacheField || !pCacheField->IsSupportedField() ) return 0; - ScDPSaveDimension& rSaveDim = *rSaveData.GetNewDimensionByName( rFieldName ); + ScDPSaveDimension* pTest = rSaveData.GetNewDimensionByName(rFieldName); + if (!pTest) + return NULL; + + ScDPSaveDimension& rSaveDim = *pTest; // orientation rSaveDim.SetOrientation( static_cast< sal_uInt16 >( maFieldInfo.GetApiOrient( EXC_SXVD_AXIS_ROWCOLPAGE ) ) ); |