coverity#705861 Dereference before null check
Change-Id: Ia027a5990769413dff323ff0e0b6fd66633b9339
This commit is contained in:
@@ -325,32 +325,35 @@ bool FuDraw::MouseMove(const MouseEvent& rMEvt)
|
|||||||
|
|
||||||
bool FuDraw::MouseButtonUp(const MouseEvent& rMEvt)
|
bool FuDraw::MouseButtonUp(const MouseEvent& rMEvt)
|
||||||
{
|
{
|
||||||
if ( mpView->IsDragHelpLine() )
|
if (mpView && mpView->IsDragHelpLine())
|
||||||
mpView->EndDragHelpLine();
|
mpView->EndDragHelpLine();
|
||||||
|
|
||||||
if ( bDragHelpLine )
|
if ( bDragHelpLine )
|
||||||
{
|
{
|
||||||
Rectangle aOutputArea(Point(0,0), mpWindow->GetOutputSizePixel());
|
Rectangle aOutputArea(Point(0,0), mpWindow->GetOutputSizePixel());
|
||||||
|
|
||||||
if ( !aOutputArea.IsInside(rMEvt.GetPosPixel()) )
|
if (mpView && !aOutputArea.IsInside(rMEvt.GetPosPixel()))
|
||||||
mpView->GetSdrPageView()->DeleteHelpLine(nHelpLine);
|
mpView->GetSdrPageView()->DeleteHelpLine(nHelpLine);
|
||||||
|
|
||||||
mpWindow->ReleaseMouse();
|
mpWindow->ReleaseMouse();
|
||||||
}
|
}
|
||||||
|
|
||||||
FrameView* pFrameView = mpViewShell->GetFrameView();
|
if (mpView)
|
||||||
mpView->SetOrtho( pFrameView->IsOrtho() );
|
{
|
||||||
mpView->SetAngleSnapEnabled( pFrameView->IsAngleSnapEnabled() );
|
FrameView* pFrameView = mpViewShell->GetFrameView();
|
||||||
mpView->SetSnapEnabled(true);
|
mpView->SetOrtho( pFrameView->IsOrtho() );
|
||||||
mpView->SetCreate1stPointAsCenter(false);
|
mpView->SetAngleSnapEnabled( pFrameView->IsAngleSnapEnabled() );
|
||||||
mpView->SetResizeAtCenter(false);
|
mpView->SetSnapEnabled(true);
|
||||||
mpView->SetDragWithCopy(pFrameView->IsDragWithCopy());
|
mpView->SetCreate1stPointAsCenter(false);
|
||||||
mpView->SetGridSnap(pFrameView->IsGridSnap());
|
mpView->SetResizeAtCenter(false);
|
||||||
mpView->SetBordSnap(pFrameView->IsBordSnap());
|
mpView->SetDragWithCopy(pFrameView->IsDragWithCopy());
|
||||||
mpView->SetHlplSnap(pFrameView->IsHlplSnap());
|
mpView->SetGridSnap(pFrameView->IsGridSnap());
|
||||||
mpView->SetOFrmSnap(pFrameView->IsOFrmSnap());
|
mpView->SetBordSnap(pFrameView->IsBordSnap());
|
||||||
mpView->SetOPntSnap(pFrameView->IsOPntSnap());
|
mpView->SetHlplSnap(pFrameView->IsHlplSnap());
|
||||||
mpView->SetOConSnap(pFrameView->IsOConSnap());
|
mpView->SetOFrmSnap(pFrameView->IsOFrmSnap());
|
||||||
|
mpView->SetOPntSnap(pFrameView->IsOPntSnap());
|
||||||
|
mpView->SetOConSnap(pFrameView->IsOConSnap());
|
||||||
|
}
|
||||||
|
|
||||||
bIsInDragMode = false;
|
bIsInDragMode = false;
|
||||||
ForcePointer(&rMEvt);
|
ForcePointer(&rMEvt);
|
||||||
|
Reference in New Issue
Block a user