summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-02 15:30:43 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-02 20:08:21 +0000
commit4e93f0f507bdd33160a63a2b70d8e7f6f1d92fee (patch)
tree1e3307943ab1ec00843c1694a693970b6bbd549b /sd
parent51c443028791132a11be84fd5eef999309d8776f (diff)
coverity#704738 Dereference after null check
Change-Id: I2fa3495a12adeb760bb9dd94fdb5859f011f11b9
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/app/sdxfer.cxx27
1 files changed, 13 insertions, 14 deletions
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index f2afea7be63e..a8dd1f739b1d 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -539,24 +539,23 @@ sal_Bool SdTransferable::GetData( const DataFlavor& rFlavor )
{
nOldSwapMode = mpSdDrawDocumentIntern->GetSwapGraphicsMode();
mpSdDrawDocumentIntern->SetSwapGraphicsMode( SDR_SWAPGRAPHICSMODE_PURGE );
- }
- if( !maDocShellRef.Is() )
- {
- maDocShellRef = new ::sd::DrawDocShell(
- mpSdDrawDocumentIntern,
- SFX_CREATE_MODE_EMBEDDED,
- sal_True,
- mpSdDrawDocumentIntern->GetDocumentType());
- mbOwnDocument = sal_False;
- maDocShellRef->DoInitNew( NULL );
- }
+ if( !maDocShellRef.Is() )
+ {
+ maDocShellRef = new ::sd::DrawDocShell(
+ mpSdDrawDocumentIntern,
+ SFX_CREATE_MODE_EMBEDDED,
+ sal_True,
+ mpSdDrawDocumentIntern->GetDocumentType());
+ mbOwnDocument = sal_False;
+ maDocShellRef->DoInitNew( NULL );
+ }
- maDocShellRef->SetVisArea( maVisArea );
- bOK = SetObject( &maDocShellRef, SDTRANSFER_OBJECTTYPE_DRAWOLE, rFlavor );
+ maDocShellRef->SetVisArea( maVisArea );
+ bOK = SetObject( &maDocShellRef, SDTRANSFER_OBJECTTYPE_DRAWOLE, rFlavor );
- if( mpSdDrawDocumentIntern )
mpSdDrawDocumentIntern->SetSwapGraphicsMode( nOldSwapMode );
+ }
}
}