Kaydet (Commit) a28ad8c9 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1265798 Dereference null return value

Change-Id: Ic4a9a42bafdc72be3de067b5f47dc98f0250f575
üst 397ca5ca
......@@ -523,7 +523,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
mpViewShell->GetViewFrame()->HasChildWindow(SvxBmpMaskChildWindow::GetChildWindowId()))
{
// pipette mode
SfxChildWindow* pWnd = mpViewShell->GetViewFrame()->GetChildWindow(SvxBmpMaskChildWindow::GetChildWindowId());
SfxChildWindow* pWnd = mpViewShell->GetViewFrame()->GetChildWindow(SvxBmpMaskChildWindow::GetChildWindowId());
SvxBmpMask* pMask = pWnd ? static_cast<SvxBmpMask*>(pWnd->GetWindow()) : NULL;
if (pMask && pMask->IsEyedropping())
{
......
......@@ -301,21 +301,21 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
}
}
if( bCont )
SfxChildWindow* pWnd = GetViewFrame()->GetChildWindow(
SvxBmpMaskChildWindow::GetChildWindowId());
SvxBmpMask* pBmpMask = pWnd ? static_cast<SvxBmpMask*>(pWnd->GetWindow()) : NULL;
assert(pBmpMask);
if (bCont && pBmpMask)
{
const Graphic& rOldGraphic = pNewObj->GetGraphic();
const Graphic aNewGraphic( static_cast<SvxBmpMask*>( GetViewFrame()->GetChildWindow(
SvxBmpMaskChildWindow::GetChildWindowId() )->GetWindow() )->
Mask( rOldGraphic ) );
const Graphic aNewGraphic(pBmpMask->Mask(rOldGraphic));
if( aNewGraphic != rOldGraphic )
{
SdrPageView* pPV = mpDrawView->GetSdrPageView();
pNewObj->SetEmptyPresObj( false );
pNewObj->SetGraphic( static_cast<SvxBmpMask*>( GetViewFrame()->GetChildWindow(
SvxBmpMaskChildWindow::GetChildWindowId() )->GetWindow() )->
Mask( pNewObj->GetGraphic() ) );
pNewObj->SetGraphic(pBmpMask->Mask(pNewObj->GetGraphic()));
OUString aStr( mpDrawView->GetDescriptionOfMarkedObjects() );
aStr += " " + SD_RESSTR(STR_EYEDROPPER);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment