sw/source/core/draw/dpage.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c831f667d28640e6877b9b6fcf090db663c368f6
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sat Aug 20 11:00:32 2022 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sat Aug 20 16:30:19 2022 +0200

    cid#1509231 Explicit null dereferenced
    
    Change-Id: Iac2f8f3e057f7a27ac0349822ab34f5ad3a6d164
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138580
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index fc1c1ebb7524..ea3c0c83f191 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -212,7 +212,7 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView 
const * pView,
             MouseEvent 
aMEvt(pWindow->ScreenToOutputPixel(rEvt.GetMousePosPixel()), 1,
                              MouseEventModifiers::NONE, MOUSE_LEFT);
             pView->PickAnything(aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt);
-            if (aVEvt.meEvent == SdrEventKind::ExecuteUrl)
+            if (aVEvt.meEvent == SdrEventKind::ExecuteUrl && aVEvt.mpURLField)
             {
                 sText = aVEvt.mpURLField->GetURL();
                 aPixRect = pWindow->LogicToPixel(aVEvt.mpObj->GetLogicRect());

Reply via email to