Kaydet (Commit) a64df1b8 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud Kaydeden (comit) Thomas Arnhold

coverity#983372 : Dereference before null check

Change-Id: Icfb2db359f2cf2625e1f7e5ed7ed0f255d40d21c
Reviewed-on: https://gerrit.libreoffice.org/2319Reviewed-by: 's avatarThomas Arnhold <thomas@arnhold.org>
Tested-by: 's avatarThomas Arnhold <thomas@arnhold.org>
üst ff6a046a
......@@ -1311,11 +1311,11 @@ ShapeExport& ShapeExport::WriteOLE2Shape( Reference< XShape > xShape )
// this part now supports only embedded spreadsheets, it can be extended to support remaining ooxml documents
// only exporter, counter and object filename are specific to spreadsheet
Reference< XSpreadsheetDocument > xSheetDoc( mAny, UNO_QUERY );
if( xSheetDoc.is() )
if( xSheetDoc.is() && mpFB)
{
Reference< XComponent > xDocument( mAny, UNO_QUERY );
Reference< XExporter > xExporter( mpFB->getServiceFactory()->createInstance( "com.sun.star.comp.oox.ExcelFilterExport" ), UNO_QUERY );
if( xDocument.is() && xExporter.is() && mpFB )
if( xDocument.is() && xExporter.is())
{
Reference< XOutputStream > xOutStream = mpFB->openFragmentStream( OUStringBuffer()
.appendAscii( GetComponentDir() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment