summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-08-07 16:40:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-08-07 21:10:13 +0200
commit2cd1442f83d41af1f2b663ccb8bfab6a954009f1 (patch)
tree04c3f914901dbb8c02a19f01f80628c3b33cb134
parent6e29949de67a73782a137f341db5ade89ae99e50 (diff)
cid#1489785 Dereference after null check
Change-Id: Ia6b3ef68582ced9628e99bc5717e0a1563323f7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120163 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index f32b0ad3c68c..582a1ba77713 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -675,6 +675,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
Point aPnt = pWindow->PixelToLogic( aPosPixel );
SdrHdl* pHdl = pView->PickHandle(aPnt);
SdrPageView* pPV;
+ SdrObject* pMacroPickObj;
ScMacroInfo* pInfo = nullptr;
SdrObject* pObj = pView->PickObj(aPnt, pView->getHitTolLog(), pPV, SdrSearchOptions::ALSOONMASTER);
@@ -708,11 +709,11 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
// could be suppressed with ALT
pWindow->SetPointer( PointerStyle::RefHand ); // Text-URL / ImageMap
}
- else if ( !bAlt && (pObj = pView->PickObj(aPnt, pView->getHitTolLog(), pPV, SdrSearchOptions::PICKMACRO)) )
+ else if ( !bAlt && (pMacroPickObj = pView->PickObj(aPnt, pView->getHitTolLog(), pPV, SdrSearchOptions::PICKMACRO)) )
{
// could be suppressed with ALT
SdrObjMacroHitRec aHitRec; //! something missing ????
- rViewShell.SetActivePointer( pObj->GetMacroPointer(aHitRec) );
+ rViewShell.SetActivePointer(pMacroPickObj->GetMacroPointer(aHitRec));
}
else if ( !bAlt && pInfo && (!pInfo->GetMacro().isEmpty() || !pObj->getHyperlink().isEmpty()) )
pWindow->SetPointer( PointerStyle::RefHand );