summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-23 13:02:21 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-23 14:16:13 +0100
commita5a1f885f080bc6e2053b86cc3a71bfa912f9bbd (patch)
treed5eae5eee68b45ce5528736d41ebbf253aba80e8
parent7ebbd60b140c7b1ea4ad707d22d5c12000a3daa4 (diff)
coverity#1078575 Unchecked dynamic_cast
Change-Id: Ib4b7c2dcfa42aea0866806684a3949d35e796b27
-rw-r--r--sw/source/core/access/accnotextframe.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index c88eef7be8d3..10c312db3cee 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -109,12 +109,13 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem
// #i73249#
case RES_TITLE_CHANGED:
{
- OUString sOldTitle;
+ OUString sOldTitle, sNewTitle;
const SwStringMsgPoolItem* pOldItem = dynamic_cast<const SwStringMsgPoolItem*>(pOld);
if (pOldItem)
sOldTitle = pOldItem->GetString();
- const OUString& sNewTitle(
- dynamic_cast<const SwStringMsgPoolItem*>(pNew)->GetString() );
+ const SwStringMsgPoolItem* pNewItem = dynamic_cast<const SwStringMsgPoolItem*>(pNew);
+ if (pNewItem)
+ sNewTitle = pNewItem->GetString();
if ( sOldTitle == sNewTitle )
{
break;