[Libreoffice-commits] core.git: sd/source

Caolán McNamara caolanm at redhat.com
Sat May 21 09:12:31 UTC 2016


 sd/source/ui/func/fuinsfil.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 16ccc5b60ac709dd1fe5e693cd0b476709718b74
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 21 10:11:43 2016 +0100

    coverity#1213133 Dereference after null check
    
    Change-Id: I3f1c1c22a22aa8f2c464108ce82a8fcd57d9ec44

diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 0e9ad31..8739104 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;


More information about the Libreoffice-commits mailing list