diff options
Diffstat (limited to 'sd/source/ui')
-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 ( |