diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-28 20:50:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-28 20:50:51 +0100 |
commit | 77a58dbde8d282e42819110b14526983f1424308 (patch) | |
tree | 57a8ba9297df0f8a097576e9c91174ea27e3bd61 /sw | |
parent | ef513fd4b049b214a03fbe6e62a5ea43680a7a9b (diff) |
coverity#1406097 Dereference null return value
Change-Id: I6e6c3a87f571274b4bbd09adc1daaa07289240db
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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<SwFormatFlyCnt&>(pHint->GetFlyCnt()) .SetFlyFormat(); |