coverity#982479 Unchecked dynamic_cast
Change-Id: I79f02538a44edb7fb7c1b94dbec365a30d896bb4
This commit is contained in:
@@ -187,9 +187,10 @@ namespace
|
|||||||
// copying additional attributes for bookmarks or fieldmarks
|
// copying additional attributes for bookmarks or fieldmarks
|
||||||
::sw::mark::IBookmark* const pNewBookmark =
|
::sw::mark::IBookmark* const pNewBookmark =
|
||||||
dynamic_cast< ::sw::mark::IBookmark* const >(pNewMark);
|
dynamic_cast< ::sw::mark::IBookmark* const >(pNewMark);
|
||||||
if(pNewBookmark)
|
const ::sw::mark::IBookmark* const pOldBookmark =
|
||||||
|
dynamic_cast< const ::sw::mark::IBookmark* >(pMark);
|
||||||
|
if (pNewBookmark && pOldBookmark)
|
||||||
{
|
{
|
||||||
const ::sw::mark::IBookmark* const pOldBookmark = dynamic_cast< const ::sw::mark::IBookmark* >(pMark);
|
|
||||||
pNewBookmark->SetKeyCode(pOldBookmark->GetKeyCode());
|
pNewBookmark->SetKeyCode(pOldBookmark->GetKeyCode());
|
||||||
pNewBookmark->SetShortName(pOldBookmark->GetShortName());
|
pNewBookmark->SetShortName(pOldBookmark->GetShortName());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user