This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 89934b3  Language: some missing null checks for ROYALE_CLASS_INFO when 
checking interfaces
89934b3 is described below

commit 89934b364f980b2c5f3f2e70cc64c414a389e317
Author: Josh Tynjala <[email protected]>
AuthorDate: Wed Sep 8 11:28:48 2021 -0700

    Language: some missing null checks for ROYALE_CLASS_INFO when checking 
interfaces
    
    This is similar to other ROYALE_CLASS_INFO null checks elsewhere in this 
class.
---
 .../Language/src/main/royale/org/apache/royale/utils/Language.as | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as
 
b/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as
index c62c159..7da7055 100644
--- 
a/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as
+++ 
b/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as
@@ -198,7 +198,7 @@ package org.apache.royale.utils
                     return classInterfaceMap.get(rightOperand);
             }
             
-            if (leftOperand.ROYALE_CLASS_INFO.interfaces)
+            if (leftOperand.ROYALE_CLASS_INFO && 
leftOperand.ROYALE_CLASS_INFO.interfaces)
             {
                 if (checkInterfaces(leftOperand, rightOperand))
                 {
@@ -266,14 +266,15 @@ package org.apache.royale.utils
             interfaces = leftOperand.ROYALE_CLASS_INFO.interfaces;
             for (i = interfaces.length - 1; i > -1; i--)
             {
-                if (interfaces[i] === rightOperand)
+                var theInterface:* = interfaces[i];
+                if (theInterface === rightOperand)
                 {
                     return true;
                 }
                 
-                if (interfaces[i].prototype.ROYALE_CLASS_INFO.interfaces)
+                if (theInterface.prototype.ROYALE_CLASS_INFO && 
theInterface.prototype.ROYALE_CLASS_INFO.interfaces)
                 {
-                    var isit:Boolean = 
checkInterfaces(interfaces[i].prototype, rightOperand);
+                    var isit:Boolean = checkInterfaces(theInterface.prototype, 
rightOperand);
                     if (isit) return true;
                 }
             }

Reply via email to