summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/docfly.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-11 11:08:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-02-11 12:00:03 +0000
commit0dec8ad842273be1d2b3e7e9da2110872fcc3de5 (patch)
tree75b99be442683377ef7998ce05a12cba0c4e50e6 /sw/source/core/doc/docfly.cxx
parent0a6a151c4b7c78a363fb64598fbda39db4f42d07 (diff)
OSL_ENSURE->assert when followed by unconditional dereference
Change-Id: Id3072473c1a4f52f606dbcfc87aa4a69ab2c012d
Diffstat (limited to 'sw/source/core/doc/docfly.cxx')
-rw-r--r--sw/source/core/doc/docfly.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index acd472d95644..6c26ce497d56 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -910,10 +910,10 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
// the attribute.
const sal_Int32 nIndx( xOldAsCharAnchorPos->nContent.GetIndex() );
SwTxtNode* pTxtNode( xOldAsCharAnchorPos->nNode.GetNode().GetTxtNode() );
- OSL_ENSURE( pTxtNode, "<SwDoc::ChgAnchor(..)> - missing previous anchor text node for as-character anchored object" );
- OSL_ENSURE( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
+ assert(pTxtNode && "<SwDoc::ChgAnchor(..)> - missing previous anchor text node for as-character anchored object");
SwTxtAttr * const pHnt =
pTxtNode->GetTxtAttrForCharAt( nIndx, RES_TXTATR_FLYCNT );
+ assert(pHnt && "Missing FlyInCnt-Hint.");
const_cast<SwFmtFlyCnt&>(pHnt->GetFlyCnt()).SetFlyFmt();
// They are disconnected. We now have to destroy the attribute.