Kaydet (Commit) 0dec8ad8 authored tarafından Caolán McNamara's avatar Caolán McNamara

OSL_ENSURE->assert when followed by unconditional dereference

Change-Id: Id3072473c1a4f52f606dbcfc87aa4a69ab2c012d
üst 0a6a151c
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment