summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-09-09 16:48:29 +0200
committerMichael Stahl <mstahl@redhat.com>2014-09-09 16:51:51 +0200
commitba1ae835fa3629deb64b0a7a359cadc5aa0a9763 (patch)
treeb6b329cfb09843779d99284d9b859722c034fdfc
parent3669242804e59c4e4d9f3db3d4e4534e223cbd78 (diff)
oox: fix 0-pointer crash in sd_import_tests
(regression from 43efd9b40d40b791a2c2deedcac36b99f7efb2cf) Change-Id: Ib8ee521cf8142000cbd38a7475772cc3455f7357
-rw-r--r--oox/source/drawingml/table/tablecell.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx
index 40533259b9b3..f3810f1e2e85 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -361,8 +361,13 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, ::oo
else if (rBackgroundFillStyle.mnThemedIdx != 0)
if (const Theme* pTheme = rFilterBase.getCurrentTheme())
{
- aBgColor = pTheme->getFillStyle(rBackgroundFillStyle.mnThemedIdx)->getBestSolidColor();
- nPhClr = rBackgroundFillStyle.maPhClr.getColor(rFilterBase.getGraphicHelper());
+ FillProperties const*const pStyle(
+ pTheme->getFillStyle(rBackgroundFillStyle.mnThemedIdx));
+ if (pStyle)
+ {
+ aBgColor = pStyle->getBestSolidColor();
+ nPhClr = rBackgroundFillStyle.maPhClr.getColor(rFilterBase.getGraphicHelper());
+ }
}
if (aBgColor.isUsed())
{