summaryrefslogtreecommitdiff
path: root/sw/source/core/undo/unattr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/undo/unattr.cxx')
-rw-r--r--sw/source/core/undo/unattr.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index a4f0e21165cd..497d48bc070b 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -472,8 +472,7 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
(FLY_AT_CHAR == rAnchor.GetAnchorId()))
{
aPos.nContent.Assign( (SwTxtNode*)pNd, rAnchor.GetPageNum() );
- if ( aPos.nContent.GetIndex() >
- static_cast<SwTxtNode*>(pNd)->GetTxt().getLength())
+ if ( aPos.nContent.GetIndex() > pNd->GetTxtNode()->GetTxt().getLength())
{
// #i35443# - invalid position.
// Thus, anchor attribute not restored