From 6a4eaa43b64d243d350e080ddfb95bc40d5681b2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 8 Nov 2014 11:52:04 +0000 Subject: coverity#1251172 Dereference null return value Change-Id: Ic1f1c7f055f3fb21e7361a2e14f6eebe3dac4216 --- sw/source/core/edit/edattr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw') diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index 009f837d5c6b..6a3cc47e2cd4 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -420,7 +420,7 @@ std::vector SwEditShell::GetSplitPaM( sal_uInt16 nWhich) const SwTxtAttr* pHt = (*pTxtNd->GetpSwpHints())[m]; const SfxItemSet* pAutoSet = CharFmt::GetItemSet ( pHt->GetAttr() ); - if ( isTXTATR_NOEND( pHt->Which() ) || !pAutoSet->HasItem( nWhich ) ) + if (isTXTATR_NOEND(pHt->Which()) || !pAutoSet || !pAutoSet->HasItem(nWhich)) continue; const sal_Int32 nAttrStart = pHt->GetStart(); const sal_Int32* pAttrEnd = pHt->End(); -- cgit