summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-28 20:50:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-05-28 20:50:51 +0100
commit77a58dbde8d282e42819110b14526983f1424308 (patch)
tree57a8ba9297df0f8a097576e9c91174ea27e3bd61 /sw
parentef513fd4b049b214a03fbe6e62a5ea43680a7a9b (diff)
coverity#1406097 Dereference null return value
Change-Id: I6e6c3a87f571274b4bbd09adc1daaa07289240db
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unodraw.cxx5
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();