summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@suse.com>2012-05-05 12:48:57 +0530
committerMichael Stahl <mstahl@redhat.com>2012-05-07 14:29:16 +0200
commit009776a16410024a9437847af065d2160b434f30 (patch)
treec4c5a6ec4711532bd0bf93b7b32b70ec790f7a81
parentbf9ab0b486ee336bd4fb91e5ad2320d25593d696 (diff)
fdo#48778: PPTX import crashes.
This probably occurs when the document has wrong idx (?) (cherry picked from commit 11713989b1580799635fff997b920d9bd4bf619f) Signed-off-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index 4652690e7765..59844ef4e49e 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -140,8 +140,8 @@ SlideFragmentHandler::~SlideFragmentHandler() throw()
case PPT_TOKEN( bgRef ): // a:CT_StyleMatrixReference
{
- FillPropertiesPtr pFillPropertiesPtr( new FillProperties(
- *mpSlidePersistPtr->getTheme()->getFillStyle( rAttribs.getInteger( XML_idx, -1 ) ) ) );
+ const FillProperties *pFillProperties = mpSlidePersistPtr->getTheme()->getFillStyle( rAttribs.getInteger( XML_idx, -1 ) );
+ FillPropertiesPtr pFillPropertiesPtr( pFillProperties ? new FillProperties( *pFillProperties ) : new FillProperties() );
ContextHandlerRef ret = new ColorContext( *this, mpSlidePersistPtr->getBackgroundColor() );
mpSlidePersistPtr->setBackgroundProperties( pFillPropertiesPtr );
return ret;