From 11969c48a670c8e47ea4fa5b9d68c877fad50463 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 3 Aug 2015 20:23:42 +0100 Subject: coverity#1314999 Dereference null return value Change-Id: Ic1ede6f029e0b0f6e6bbf3a6b9e073d98454a769 --- sw/source/core/txtnode/thints.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 59205c288e8c..3da268ea6ad6 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1804,8 +1804,10 @@ bool SwTextNode::TryCharSetExpandToNum(const SfxItemSet& aCharSet) { bool bRet = false; SfxItemIter aIter( aCharSet ); - const SfxPoolItem* pItem = aIter.FirstItem(); - const sal_uInt16 nWhich = pItem->Which(); + const SfxPoolItem* pItem = aIter.FirstItem(); + if (!pItem) + return bRet; + const sal_uInt16 nWhich = pItem->Which(); const SfxPoolItem& rInnerItem = GetAttr(nWhich,false); -- cgit