Bug 386012, Crash [@ nsTextFrameUtils::TransformText] loading png as HTML, Patch by Karl Tomlinson, r+sr=roc

This commit is contained in:
flamingice@sourmilk.net 2007-07-02 17:46:05 -07:00
parent 27f03cbda7
commit 1807da1b5c

View File

@ -5333,6 +5333,10 @@ nsTextFrame::Reflow(nsPresContext* aPresContext,
PRInt32 limitLength = length;
PRInt32 forceBreak = lineLayout.GetForcedBreakPosition(mContent);
if (forceBreak >= offset + length) {
// The break is not within the text considered for this textframe.
forceBreak = -1;
}
if (forceBreak >= 0) {
limitLength = forceBreak - offset;
NS_ASSERTION(limitLength >= 0, "Weird break found!");