summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-21 10:11:43 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-21 10:11:43 +0100
commit16ccc5b60ac709dd1fe5e693cd0b476709718b74 (patch)
tree0968d9c17c7adcc4d622824e0083bab7b9255e50 /sd
parent387e383b40f329e65b7c8136217403dddcecf6c3 (diff)
coverity#1213133 Dereference after null check
Change-Id: I3f1c1c22a22aa8f2c464108ce82a8fcd57d9ec44
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/fuinsfil.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 0e9ad314705b..87391049f8cb 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -327,7 +327,8 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium)
mpDocSh->SetWaitCursor( false );
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg(mpViewShell->GetActiveWindow(), mpDoc, pMedium, aFile) : nullptr);
+ vcl::Window* pParent = mpViewShell ? mpViewShell->GetActiveWindow() : nullptr;
+ std::unique_ptr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg(pParent, mpDoc, pMedium, aFile) : nullptr);
if( !pDlg )
return false;