Kaydet (Commit) 00212cdb authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1237355 Dereference null return value

Change-Id: I66956979c494f96f76eb0a7840f28c8edc91d816
üst 2f27dd63
......@@ -652,19 +652,17 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
}
::sd::DrawDocShell* pDocShell(NULL);
::sd::ViewShellBase* pBase(NULL);
SdDrawDocument* pDoc(NULL);
if (pShell && pViewFrame)
{
pDocShell = PTR_CAST(::sd::DrawDocShell, pShell);
pDoc = pDocShell ? pDocShell->GetDoc() : NULL;
pBase = ::sd::ViewShellBase::GetViewShellBase(pViewFrame);
}
if (pDocShell)
if (pDoc && pBase)
{
SdDrawDocument* pDoc = pDocShell->GetDoc();
::sd::ViewShellBase* pBase =
::sd::ViewShellBase::GetViewShellBase (
pViewFrame);
assert(pBase!=NULL);
::boost::shared_ptr<sd::ViewShell> pViewSh = pBase->GetMainViewShell();
SdOptions* pOptions = GetSdOptions(pDoc->GetDocumentType());
......
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