skipAsCoercions is on, so have to use 'is' when you need it

Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/91ef059d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/91ef059d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/91ef059d

Branch: refs/heads/tlf
Commit: 91ef059d2e8a65602f0b82857bd9b272c334c76b
Parents: 824e578
Author: Alex Harui <[email protected]>
Authored: Mon May 8 11:06:47 2017 -0700
Committer: Alex Harui <[email protected]>
Committed: Mon May 8 11:59:03 2017 -0700

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/textLayout/compose/TextFlowLine.as | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/91ef059d/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/compose/TextFlowLine.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/compose/TextFlowLine.as
 
b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/compose/TextFlowLine.as
index 14c52e2..cf207b6 100644
--- 
a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/compose/TextFlowLine.as
+++ 
b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/compose/TextFlowLine.as
@@ -1855,7 +1855,9 @@ package org.apache.flex.textLayout.compose
                        }
                        else
                        {
-                               var testILG:IInlineGraphicElement = startElem 
as IInlineGraphicElement;
+                               var testILG:IInlineGraphicElement = null;
+                               if (startElem is IInlineGraphicElement) // need 
this since skipAsCoercions is on
+                                       startElem as IInlineGraphicElement;
                                if (!testILG || testILG.effectiveFloat == 
Float.NONE || begIdx == endIdx)
                                {
                                        blockRect = makeBlock(textLine, begIdx, 
begAtomIndex, endAtomIndex, startMetrics, blockProgression, direction, 
heightAndAdj);

Reply via email to