added safety check

Change-Id: I05ca3e5b176202d26c2f2e45cc674ea54934a30b
This commit is contained in:
Radek Doulik 2012-10-09 11:24:28 +02:00
parent 9040130ade
commit 4874a0dcbf

View file

@ -178,7 +178,7 @@ SlideFragmentHandler::~SlideFragmentHandler() throw()
case A_TOKEN( overrideClrMapping ):
case PPT_TOKEN( clrMap ): // CT_ColorMapping
{
oox::drawingml::ClrMapPtr pClrMapPtr( aElementToken == PPT_TOKEN( clrMap ) ? new oox::drawingml::ClrMap() : new oox::drawingml::ClrMap( *mpSlidePersistPtr->getClrMap() ) );
oox::drawingml::ClrMapPtr pClrMapPtr( ( aElementToken == PPT_TOKEN( clrMap ) || !mpSlidePersistPtr.get() ) ? new oox::drawingml::ClrMap() : new oox::drawingml::ClrMap( *mpSlidePersistPtr->getClrMap() ) );
ContextHandlerRef ret = new oox::drawingml::clrMapContext( *this, rAttribs.getFastAttributeList(), *pClrMapPtr );
mpSlidePersistPtr->setClrMap( pClrMapPtr );
return ret;