From 77a58dbde8d282e42819110b14526983f1424308 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 28 May 2017 20:50:51 +0100 Subject: coverity#1406097 Dereference null return value Change-Id: I6e6c3a87f571274b4bbd09adc1daaa07289240db --- sw/source/core/unocore/unodraw.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 63d50325deed..81e9831d1125 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1142,9 +1142,10 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a SwTextAttr * const pHint = pTextNode->GetTextAttrForCharAt( nIdx, RES_TXTATR_FLYCNT ); - SAL_WARN_IF( !pHint || pHint->Which() != RES_TXTATR_FLYCNT, + assert(pHint && "Missing Hint."); + SAL_WARN_IF( pHint->Which() != RES_TXTATR_FLYCNT, "sw.uno", "Missing FlyInCnt-Hint." ); - SAL_WARN_IF( !pHint || pHint->GetFlyCnt().GetFrameFormat() != pFormat, + SAL_WARN_IF( pHint->GetFlyCnt().GetFrameFormat() != pFormat, "sw.uno", "Wrong TextFlyCnt-Hint." ); const_cast(pHint->GetFlyCnt()) .SetFlyFormat(); -- cgit