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

coverity#1266472 Dereference null return value

Change-Id: Ifb7c4da642b254d41bf746725ee9435f6bd1efeb
üst 55a4c5d6
......@@ -140,11 +140,14 @@ namespace
return pChildWindow ? static_cast<SvxContourDlg*>(pChildWindow->GetWindow()) : NULL;
}
SvxIMapDlg* GetIMapDlg(SwView &rView)
{
SfxChildWindow* pWnd = rView.GetViewFrame()->GetChildWindow(SvxIMapDlgChildWindow::GetChildWindowId());
return pWnd ? static_cast<SvxIMapDlg*>(pWnd->GetWindow()) : NULL;
}
}
#define SWIMAPDLG(rView) ( static_cast<SvxIMapDlg*>( rView.GetViewFrame()->GetChildWindow( \
SvxIMapDlgChildWindow::GetChildWindowId() )-> \
GetWindow() ) )
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
......@@ -919,7 +922,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case SID_IMAP_EXEC:
{
SvxIMapDlg* pDlg = SWIMAPDLG(GetView());
SvxIMapDlg* pDlg = GetIMapDlg(GetView());
// Check, if the allocation is useful or allowed at all.
if ( rSh.IsFrmSelected() &&
......@@ -1460,7 +1463,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
}
else
{
SvxIMapDlg *pDlg = SWIMAPDLG(GetView());
SvxIMapDlg *pDlg = GetIMapDlg(GetView());
if( pDlg->GetEditingObject() != rSh.GetIMapInventor() )
lcl_UpdateIMapDlg( rSh );
}
......
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