[Libreoffice-commits] .: Branch 'libreoffice-3-4-0' - oox/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Fri May 20 02:07:37 PDT 2011
oox/source/ppt/presentationfragmenthandler.cxx | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit 2a1a6bbd6f51ab28e8faea82d76d91f9cab6fb23
Author: Michael Meeks <michael.meeks at novell.com>
Date: Thu May 19 16:42:44 2011 +0100
don't de-reference null pointer - fix crash with certain PPTX files
Signed-off-by: Jan Holesovsky <kendy at suse.cz>
Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index c18fd4a..cbae082 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -246,11 +246,13 @@ void PresentationFragmentHandler::endDocument() throw (SAXException, RuntimeExce
}
// importing slide page
- pSlidePersistPtr->setMasterPersist( pMasterPersistPtr );
- pSlidePersistPtr->setTheme( pMasterPersistPtr->getTheme() );
- Reference< drawing::XMasterPageTarget > xMasterPageTarget( pSlidePersistPtr->getPage(), UNO_QUERY );
- if( xMasterPageTarget.is() )
- xMasterPageTarget->setMasterPage( pMasterPersistPtr->getPage() );
+ if (pMasterPersistPtr.get()) {
+ pSlidePersistPtr->setMasterPersist( pMasterPersistPtr );
+ pSlidePersistPtr->setTheme( pMasterPersistPtr->getTheme() );
+ Reference< drawing::XMasterPageTarget > xMasterPageTarget( pSlidePersistPtr->getPage(), UNO_QUERY );
+ if( xMasterPageTarget.is() )
+ xMasterPageTarget->setMasterPage( pMasterPersistPtr->getPage() );
+ }
rFilter.getDrawPages().push_back( pSlidePersistPtr );
rFilter.setActualSlidePersist( pSlidePersistPtr );
importSlide( xSlideFragmentHandler, pSlidePersistPtr );
More information about the Libreoffice-commits
mailing list