diff --git a/layout/base/nsBidiPresUtils.cpp b/layout/base/nsBidiPresUtils.cpp index 340de03fd5c1..7b1b5574f68d 100644 --- a/layout/base/nsBidiPresUtils.cpp +++ b/layout/base/nsBidiPresUtils.cpp @@ -803,8 +803,6 @@ nsBidiPresUtils::TraverseFrames(nsBlockFrame* aBlockFrame, mBuffer.Append(Substring(text, start, endLine - start)); if (PRUint32(endLine) < text.Length()) { - nsTextFrame* textFrame = static_cast(frame); - textFrame->SetLength(endLine - start, nsnull); next = frame->GetNextInFlow(); if (!next) { // If the frame already has a bidi continuation, make it fluid @@ -817,6 +815,8 @@ nsBidiPresUtils::TraverseFrames(nsBlockFrame* aBlockFrame, CreateContinuation(frame, &next, PR_TRUE); } } + nsTextFrame* textFrame = static_cast(frame); + textFrame->SetLength(endLine - start, nsnull); } ResolveParagraphWithinBlock(aBlockFrame);