[Libreoffice-commits] core.git: filter/source
Caolán McNamara
caolanm at redhat.com
Tue Mar 21 11:51:13 UTC 2017
filter/source/msfilter/svdfppt.cxx | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
New commits:
commit ac655f20ad99bedd059ab2a046aa0a0ac2312beb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 21 11:50:28 2017 +0000
ofz#923 don't crash on missing shell storage
Change-Id: I689fcf6b82d5df8121c1bb4ca1a92bf0f145d7f5
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index ed94ca963e50..92e5f8fa1be5 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1901,14 +1901,18 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
aNm = pOe->pShell->getEmbeddedObjectContainer().CreateUniqueObjectName();
// object is not an own object
- tools::SvRef<SotStorage> xTarget = SotStorage::OpenOLEStorage( pOe->pShell->GetStorage(), aNm, StreamMode::READWRITE );
- if ( xObjStor.is() && xTarget.is() )
+ const css::uno::Reference < css::embed::XStorage >& rStorage = pOe->pShell->GetStorage();
+ if (rStorage.is())
{
- xObjStor->CopyTo( xTarget.get() );
- if( !xTarget->GetError() )
- xTarget->Commit();
+ tools::SvRef<SotStorage> xTarget = SotStorage::OpenOLEStorage(rStorage, aNm, StreamMode::READWRITE);
+ if (xObjStor.is() && xTarget.is())
+ {
+ xObjStor->CopyTo(xTarget.get());
+ if (!xTarget->GetError())
+ xTarget->Commit();
+ }
+ xTarget.clear();
}
- xTarget.clear();
uno::Reference < embed::XEmbeddedObject > xObj =
pOe->pShell->getEmbeddedObjectContainer().GetEmbeddedObject( aNm );
More information about the Libreoffice-commits
mailing list