FLEX-35100 CAUSE: TextBlock.createTextLine() orTextBlock.recreateTextLine() return null when there's no more text to create lines for (as indicated by the previousLine parameter) or the TextBlock's content's text is null or "". (It's also possible when the width parameter is insufficient, but in this case the fitSomething parameter is true, which excludes this case).
SOLUTION: Added a null check for textLine. Project: http://git-wip-us.apache.org/repos/asf/flex-tlf/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-tlf/commit/cb2794ed Tree: http://git-wip-us.apache.org/repos/asf/flex-tlf/tree/cb2794ed Diff: http://git-wip-us.apache.org/repos/asf/flex-tlf/diff/cb2794ed Branch: refs/heads/develop Commit: cb2794edbda69257b9660132d27931220049a355 Parents: 9526d45 Author: Mihai Chira <[email protected]> Authored: Sat Jun 18 16:37:17 2016 +0200 Committer: Mihai Chira <[email protected]> Committed: Sat Jun 18 16:37:17 2016 +0200 ---------------------------------------------------------------------- textLayout/src/flashx/textLayout/compose/TextFlowLine.as | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/cb2794ed/textLayout/src/flashx/textLayout/compose/TextFlowLine.as ---------------------------------------------------------------------- diff --git a/textLayout/src/flashx/textLayout/compose/TextFlowLine.as b/textLayout/src/flashx/textLayout/compose/TextFlowLine.as index c3c73f0..dbc935c 100644 --- a/textLayout/src/flashx/textLayout/compose/TextFlowLine.as +++ b/textLayout/src/flashx/textLayout/compose/TextFlowLine.as @@ -933,7 +933,10 @@ package flashx.textLayout.compose } else textLine = swfContext.callInContext(textBlock.createTextLine, textBlock, [ previousLine, _targetWidth, effLineOffset, true ]); - + + if(textLine == null) + return null; + textLine.x = this.x; CONFIG::debug { Debugging.traceFTEAssign(textLine,"x", this.x); } textLine.y = createShapeY(bp);
