From c5e580abdb7fbd904e07ed0620e7acdbc382125f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 11 Nov 2014 15:11:54 +0000 Subject: coverity#1130164 Unchecked return value Change-Id: I9d040b0a8862095ff7ac20b07642d60c17e54fce --- sw/source/core/text/atrstck.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx index eb4584fb7c5d..0f12f74103a9 100644 --- a/sw/source/core/text/atrstck.cxx +++ b/sw/source/core/text/atrstck.cxx @@ -224,8 +224,8 @@ static bool lcl_ChgHyperLinkColor( const SwTxtAttr& rAttr, rINetAttr.SetVisited(false); const SwCharFmt* pTmpFmt = rINetAttr.GetCharFmt(); const SfxPoolItem* pItem; - pTmpFmt->GetItemState( RES_CHRATR_COLOR, true, &pItem ); - *pColor = ((SvxColorItem*)pItem)->GetValue(); + if (SfxItemState::SET == pTmpFmt->GetItemState(RES_CHRATR_COLOR, true, &pItem)) + *pColor = ((SvxColorItem*)pItem)->GetValue(); rINetAttr.SetVisited(true); } return true; -- cgit v1.2.3