summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-30 09:20:33 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-30 11:48:58 +0100
commit6a8e7fde5084b46d62c99aae91e4e6f78c14f178 (patch)
tree6caf50b951dee4aae59f848f626b681d79357f90 /sd
parent6bbb8b88fd93b8a91f8ef6142635b07f3c11b28e (diff)
coverity#705861 Dereference before null check
Change-Id: Ia027a5990769413dff323ff0e0b6fd66633b9339
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/fudraw.cxx33
1 files changed, 18 insertions, 15 deletions
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index fdc6ea1f3219..f06425d24c5a 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -325,32 +325,35 @@ bool FuDraw::MouseMove(const MouseEvent& rMEvt)
bool FuDraw::MouseButtonUp(const MouseEvent& rMEvt)
{
- if ( mpView->IsDragHelpLine() )
+ if (mpView && mpView->IsDragHelpLine())
mpView->EndDragHelpLine();
if ( bDragHelpLine )
{
Rectangle aOutputArea(Point(0,0), mpWindow->GetOutputSizePixel());
- if ( !aOutputArea.IsInside(rMEvt.GetPosPixel()) )
+ if (mpView && !aOutputArea.IsInside(rMEvt.GetPosPixel()))
mpView->GetSdrPageView()->DeleteHelpLine(nHelpLine);
mpWindow->ReleaseMouse();
}
- FrameView* pFrameView = mpViewShell->GetFrameView();
- mpView->SetOrtho( pFrameView->IsOrtho() );
- mpView->SetAngleSnapEnabled( pFrameView->IsAngleSnapEnabled() );
- mpView->SetSnapEnabled(true);
- mpView->SetCreate1stPointAsCenter(false);
- mpView->SetResizeAtCenter(false);
- mpView->SetDragWithCopy(pFrameView->IsDragWithCopy());
- mpView->SetGridSnap(pFrameView->IsGridSnap());
- mpView->SetBordSnap(pFrameView->IsBordSnap());
- mpView->SetHlplSnap(pFrameView->IsHlplSnap());
- mpView->SetOFrmSnap(pFrameView->IsOFrmSnap());
- mpView->SetOPntSnap(pFrameView->IsOPntSnap());
- mpView->SetOConSnap(pFrameView->IsOConSnap());
+ if (mpView)
+ {
+ FrameView* pFrameView = mpViewShell->GetFrameView();
+ mpView->SetOrtho( pFrameView->IsOrtho() );
+ mpView->SetAngleSnapEnabled( pFrameView->IsAngleSnapEnabled() );
+ mpView->SetSnapEnabled(true);
+ mpView->SetCreate1stPointAsCenter(false);
+ mpView->SetResizeAtCenter(false);
+ mpView->SetDragWithCopy(pFrameView->IsDragWithCopy());
+ mpView->SetGridSnap(pFrameView->IsGridSnap());
+ mpView->SetBordSnap(pFrameView->IsBordSnap());
+ mpView->SetHlplSnap(pFrameView->IsHlplSnap());
+ mpView->SetOFrmSnap(pFrameView->IsOFrmSnap());
+ mpView->SetOPntSnap(pFrameView->IsOPntSnap());
+ mpView->SetOConSnap(pFrameView->IsOConSnap());
+ }
bIsInDragMode = false;
ForcePointer(&rMEvt);