Kaydet (Commit) dc563d3a authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

coverity#704693 Unchecked dynamic cast

Change-Id: I5363aeccf469b70a76ee66f8f70dff1eb18cac52
üst 807a7af5
......@@ -1728,7 +1728,14 @@ bool ScModule::IsTableLocked()
SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( nCurRefDlgId );
ScAnyRefModalDlg* pModalDlg = GetCurrentAnyRefDlg();
if ( pChildWnd )
bLocked = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow())->IsTableLocked();
{
IAnyRefDialog* pRefDlg(dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow()));
assert(pRefDlg);
if(pRefDlg)
{
bLocked = pRefDlg->IsTableLocked();
}
}
else if( pModalDlg )
bLocked = pModalDlg->IsTableLocked();
else
......
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