summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2013-02-21 18:43:20 -0600
committerThomas Arnhold <thomas@arnhold.org>2013-02-24 01:54:47 +0000
commita64df1b8fd594dceb561565a77db5cc095085e66 (patch)
tree26887d08658fcef057ca0d017f6c0a776e342373 /oox
parentff6a046a916ca91e39072700c4ddd591a6e2f2d4 (diff)
coverity#983372 : Dereference before null check
Change-Id: Icfb2db359f2cf2625e1f7e5ed7ed0f255d40d21c Reviewed-on: https://gerrit.libreoffice.org/2319 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/shapes.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 41d505a5df48..d276f7423485 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -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() )