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

coverity#1257109 Unchecked dynamic_cast

and

coverity#1257108 Unchecked dynamic_cast

Change-Id: Ib0d42b7fcd3b2b87a95301b111cebe80f54dd13f
üst ab61d71c
......@@ -81,7 +81,7 @@ void SwDPage::lateInit(const SwDPage& rPage, SwDrawModel* const pNewModel)
SwDrawModel* pSwDrawModel = pNewModel;
if ( !pModel )
{
pSwDrawModel = dynamic_cast< SwDrawModel* >( GetModel() );
pSwDrawModel = &dynamic_cast<SwDrawModel&>(*GetModel());
assert( pSwDrawModel );
}
pDoc = &pSwDrawModel->GetDoc();
......@@ -98,7 +98,7 @@ SwDPage* SwDPage::Clone(SdrModel* const pNewModel) const
SwDrawModel* pSwDrawModel = 0;
if ( pNewModel )
{
pSwDrawModel = dynamic_cast< SwDrawModel* >( pNewModel );
pSwDrawModel = &dynamic_cast<SwDrawModel&>(*pNewModel);
assert( pSwDrawModel );
}
pNewPage->lateInit( *this, pSwDrawModel );
......
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