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

coverity#1265807 Dereference null return value

Change-Id: I545a4ecee209d4198caebbcf394eccfe113a32a4
üst a5ce2b61
......@@ -208,8 +208,11 @@ void ScDrawTextObjectBar::GetFormTextState(SfxItemSet& rSet)
sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
if ( pViewFrm->HasChildWindow(nId) )
pDlg = static_cast<SvxFontWorkDialog*>(pViewFrm->GetChildWindow(nId)->GetWindow());
if (pViewFrm->HasChildWindow(nId))
{
SfxChildWindow* pWnd = pViewFrm->GetChildWindow(nId);
pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : NULL;
}
if ( rMarkList.GetMarkCount() == 1 )
pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
......
......@@ -30,9 +30,8 @@ sal_uInt16 ScIMapChildWindowId()
SvxIMapDlg* ScGetIMapDlg()
{
//! pass view frame here and in SVXIMAPDLG()
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
if( pViewFrm && pViewFrm->HasChildWindow( SvxIMapDlgChildWindow::GetChildWindowId() ) )
if (pViewFrm && pViewFrm->HasChildWindow(SvxIMapDlgChildWindow::GetChildWindowId()))
return SVXIMAPDLG();
else
return NULL;
......
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