summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-07 11:47:23 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-07 15:47:25 +0100
commitd386da8bb3e39e052e83a3aa166d1f1a305171f7 (patch)
treeb9e7c7d738f14b0ac6046eef145c9653d77e7640 /sd
parent2241ffeaa50085161e009902eb18f4d7ae1afcb7 (diff)
coverity#735832 Explicit null dereferenced
Change-Id: Ifcce7f0d75cb595add30a4403e5c42348043137b
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/app/sdmod1.cxx12
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 (