summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/text/atrstck.cxx4
1 files changed, 2 insertions, 2 deletions
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;