diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-07 11:47:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-07 15:47:25 +0100 |
commit | d386da8bb3e39e052e83a3aa166d1f1a305171f7 (patch) | |
tree | b9e7c7d738f14b0ac6046eef145c9653d77e7640 /sd | |
parent | 2241ffeaa50085161e009902eb18f4d7ae1afcb7 (diff) |
coverity#735832 Explicit null dereferenced
Change-Id: Ifcce7f0d75cb595add30a4403e5c42348043137b
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/app/sdmod1.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index 21fec2bd80e2..f6f453c9699d 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -658,11 +658,15 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) ApplyItemSet( SID_SD_EDITOPTIONS, *pRet.get() ); } - if( pShell && pViewFrame ) + ::sd::DrawDocShell* pDocShell(NULL); + if (pShell && pViewFrame) { - ::sd::DrawDocShell* pDocShell = - PTR_CAST(::sd::DrawDocShell,pShell); - SdDrawDocument* pDoc = pDocShell->GetDoc(); + pDocShell = PTR_CAST(::sd::DrawDocShell, pShell); + } + + if (pDocShell) + { + SdDrawDocument* pDoc = pDocShell->GetDoc(); ::sd::ViewShellBase* pBase = ::sd::ViewShellBase::GetViewShellBase ( |