sd/source/ui/func/futext.cxx | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-)
New commits: commit 2e28f5a9f662f3995db06743ed043cbd094b1a68 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Oct 18 01:41:18 2024 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Oct 23 20:27:22 2024 +0200 tdf#163486: PVS: check mpViewSh V595 The 'mpView' pointer was utilized before it was verified against nullptr. Check lines: 719, 720. Change-Id: Ie1bda82df979fd5f293fb6eb9623917371e9da34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175113 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 446c58381811..24f8ad1e3046 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -716,18 +716,21 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt) ForcePointer(&rMEvt); mpWindow->ReleaseMouse(); - const SdrMarkList& rMarkList = mpView->GetMarkedObjectList(); - if ( mpView && rMarkList.GetMarkCount() == 0 ) + if (mpView) { - sal_uInt16 nDrgLog1 = sal_uInt16 ( mpWindow->PixelToLogic(Size(mpView->GetDragThresholdPixels(),0)).Width() ); - if ( std::abs(aMDPos.X() - aPnt.X()) < nDrgLog1 && - std::abs(aMDPos.Y() - aPnt.Y()) < nDrgLog1 && - !rMEvt.IsShift() && !rMEvt.IsMod2() ) + const SdrMarkList& rMarkList = mpView->GetMarkedObjectList(); + if ( rMarkList.GetMarkCount() == 0 ) { - SdrPageView* pPV2 = mpView->GetSdrPageView(); - SdrViewEvent aVEvt; - mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); - mpView->MarkObj(aVEvt.mpRootObj, pPV2); + sal_uInt16 nDrgLog1 = sal_uInt16 ( mpWindow->PixelToLogic(Size(mpView->GetDragThresholdPixels(),0)).Width() ); + if ( std::abs(aMDPos.X() - aPnt.X()) < nDrgLog1 && + std::abs(aMDPos.Y() - aPnt.Y()) < nDrgLog1 && + !rMEvt.IsShift() && !rMEvt.IsMod2() ) + { + SdrPageView* pPV2 = mpView->GetSdrPageView(); + SdrViewEvent aVEvt; + mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); + mpView->MarkObj(aVEvt.mpRootObj, pPV2); + } } }