diff options
author | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2014-02-28 10:30:48 +0100 |
---|---|---|
committer | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2014-02-28 13:01:59 +0100 |
commit | de90456c71aa121cb0a6d0f7b316b3da0e6088fc (patch) | |
tree | f5eb4b04885215449dd27d819c36c90bc60f1222 /sw/source/filter/ww8/docxexport.cxx | |
parent | d18529591e6879458ec594e7b09ff167791d5e2a (diff) |
sw: prevent crash
In case some error happens when exporting OLE to docx.
Change-Id: I5673f13e2fb4bc7887f1fc54771532c049129047
Diffstat (limited to 'sw/source/filter/ww8/docxexport.cxx')
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index d76890610873..669b3c1f3fd1 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -382,6 +382,9 @@ OString DocxExport::WriteOLEObject( SwOLEObj& rObject, OUString sMediaType, OUSt // function copied from embeddedobj/source/msole/oleembed.cxx bool DocxExport::lcl_CopyStream( uno::Reference<io::XInputStream> xIn, uno::Reference<io::XOutputStream> xOut ) { + if( !xIn.is() || !xOut.is() ) + return false; + const sal_Int32 nChunkSize = 4096; uno::Sequence< sal_Int8 > aData(nChunkSize); sal_Int32 nTotalRead = 0; |