Kaydet (Commit) 4e93f0f5 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#704738 Dereference after null check

Change-Id: I2fa3495a12adeb760bb9dd94fdb5859f011f11b9
üst 51c44302
......@@ -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 );
}
}
}
......
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