From a5a1f885f080bc6e2053b86cc3a71bfa912f9bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 23 May 2014 13:02:21 +0100 Subject: [PATCH] coverity#1078575 Unchecked dynamic_cast Change-Id: Ib4b7c2dcfa42aea0866806684a3949d35e796b27 --- sw/source/core/access/accnotextframe.cxx | 7 ++++--- 1 file 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(pOld); if (pOldItem) sOldTitle = pOldItem->GetString(); - const OUString& sNewTitle( - dynamic_cast(pNew)->GetString() ); + const SwStringMsgPoolItem* pNewItem = dynamic_cast(pNew); + if (pNewItem) + sNewTitle = pNewItem->GetString(); if ( sOldTitle == sNewTitle ) { break;