coverity#1078575 Unchecked dynamic_cast

Change-Id: Ie25c91ce0035c78629ebd8466baa717d62948503
This commit is contained in:
Miklos Vajna
2014-05-03 20:53:02 +02:00
parent be8a675617
commit 26946775d7

View File

@@ -109,8 +109,10 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem
// #i73249#
case RES_TITLE_CHANGED:
{
const OUString& sOldTitle(
dynamic_cast<const SwStringMsgPoolItem*>(pOld)->GetString() );
OUString sOldTitle;
const SwStringMsgPoolItem* pOldItem = dynamic_cast<const SwStringMsgPoolItem*>(pOld);
if (pOldItem)
sOldTitle = pOldItem->GetString();
const OUString& sNewTitle(
dynamic_cast<const SwStringMsgPoolItem*>(pNew)->GetString() );
if ( sOldTitle == sNewTitle )