summaryrefslogtreecommitdiff
path: root/sw/source/core/undo/undobj1.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-12 09:09:56 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-05-12 09:28:13 +0100
commit510b667023ac2069021f9ccd76efd4989e09a1ce (patch)
tree72ccf84d39eea46af26b0717366ce5dc8fcc2050 /sw/source/core/undo/undobj1.cxx
parenta31874f38a179d89dcc9eaedcbcf21dc34f3b9fe (diff)
coverity#1406101 Dereference null return value
and coverity#1406100 Dereference null return value coverity#1406099 Dereference null return value coverity#1406098 Dereference null return value coverity#1406097 Dereference null return value Change-Id: I26d5c0f2e69dc049a87a607ca28586dc575a8ca3
Diffstat (limited to 'sw/source/core/undo/undobj1.cxx')
-rw-r--r--sw/source/core/undo/undobj1.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index 2379b521afa6..65b6db6aad38 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -557,9 +557,10 @@ void SwUndoSetFlyFormat::UndoImpl(::sw::UndoRedoContext & rContext)
const sal_Int32 nIdx = pPos->nContent.GetIndex();
SwTextAttr * pHint = pTextNode->GetTextAttrForCharAt(
nIdx, RES_TXTATR_FLYCNT );
- OSL_ENSURE( pHint && pHint->Which() == RES_TXTATR_FLYCNT,
+ assert(pHint && "Missing Hint.");
+ OSL_ENSURE( pHint->Which() == RES_TXTATR_FLYCNT,
"Missing FlyInCnt-Hint." );
- OSL_ENSURE( pHint && pHint->GetFlyCnt().GetFrameFormat() == pFrameFormat,
+ OSL_ENSURE( pHint->GetFlyCnt().GetFrameFormat() == pFrameFormat,
"Wrong TextFlyCnt-Hint." );
const_cast<SwFormatFlyCnt&>(pHint->GetFlyCnt()).SetFlyFormat();