[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Aug 31 10:12:19 PDT 2012
sc/source/filter/excel/xipivot.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 98ec92335d18bb361a63cea3e1e71a87dddded2b
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Fri Aug 31 12:46:54 2012 -0400
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
Signed-off-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 2d30efb..8f9596a 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 ) ) );
More information about the Libreoffice-commits
mailing list