diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-24 14:45:11 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-24 14:45:11 +0000 |
commit | 3088788c6d122d1e2cfec04c33d4d084a019e782 (patch) | |
tree | 9474af298e6e7785c226d71743109607e12887c3 /sd | |
parent | c8af68bc5adf093f9df803f6fe0147ac9d116169 (diff) |
coverity#1265809 Dereference null return value
Change-Id: I9926fa66c99009403e5a4b90e30954f3330bba1c
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drviews4.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 4acf5edc2770..afd241bc1464 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -288,8 +288,13 @@ void DrawViewShell::MouseButtonDown(const MouseEvent& rMEvt, //If object is marked , the corresponding entry is set true , //else the corresponding entry is set false . FreshNavigatrTree(); - if ( mbPipette ) - static_cast<SvxBmpMask*>( GetViewFrame()->GetChildWindow( SvxBmpMaskChildWindow::GetChildWindowId() )->GetWindow() )->PipetteClicked(); + if (mbPipette) + { + SfxChildWindow* pWnd = GetViewFrame()->GetChildWindow(SvxBmpMaskChildWindow::GetChildWindowId()); + SvxBmpMask* pBmpMask = pWnd ? static_cast<SvxBmpMask*>(pWnd->GetWindow()) : NULL; + if (pBmpMask) + pBmpMask->PipetteClicked(); + } } } |