summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-16 20:14:37 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-16 20:46:33 +0000
commit8877a2fbf5b71c45fd8af308884f9f52e34d7e9f (patch)
tree78e82106ac9293e820756bb0ab1c75a8bd624df0
parentd7df2dbc6528cd91bb9628f9659605d4516f8d28 (diff)
coverity#982483 Dereference after null check
Change-Id: I6098e597cb00fccff4cf4611a8ac82badf1bdf02
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx29
1 files changed, 16 insertions, 13 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 329944b452b0..d10edecc9d48 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -4064,21 +4064,24 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
bool bIsSelectionGfx = rSh.GetSelectionType() & nsSelectionType::SEL_GRF;
bool bisResize = eSdrMoveHdl != HDL_MOVE;
- if ( rMEvt.IsShift() )
- {
- pSdrView->SetAngleSnapEnabled(!bIsSelectionGfx);
- if (bisResize)
- pSdrView->SetOrtho(!bIsSelectionGfx);
- else
- pSdrView->SetOrtho(true);
- }
- else
+ if (pSdrView)
{
- pSdrView->SetAngleSnapEnabled(bIsSelectionGfx);
- if (bisResize)
- pSdrView->SetOrtho(bIsSelectionGfx);
+ if (rMEvt.IsShift())
+ {
+ pSdrView->SetAngleSnapEnabled(!bIsSelectionGfx);
+ if (bisResize)
+ pSdrView->SetOrtho(!bIsSelectionGfx);
+ else
+ pSdrView->SetOrtho(true);
+ }
else
- pSdrView->SetOrtho(false);
+ {
+ pSdrView->SetAngleSnapEnabled(bIsSelectionGfx);
+ if (bisResize)
+ pSdrView->SetOrtho(bIsSelectionGfx);
+ else
+ pSdrView->SetOrtho(false);
+ }
}
rSh.Drag( &aDocPt, rMEvt.IsShift() );