TypeDefinition: fix exception if interface.prototype.ROYALE_CLASS_INFO doesn't exist If externs defines an interface, ROYALE_CLASS_INFO may not exist. There are other similar checks for superclasses, so this just handles the same case for interfaces.
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/TypeDefinition.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/TypeDefinition.as index f53d5cd..51067b4 100755 --- a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/TypeDefinition.as +++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/TypeDefinition.as
@@ -428,7 +428,9 @@ if ((_kind || kind) == "interface") { //collect.length can expand during the loop below for (i = 0; i < collect.length; i++) { - collect.push.apply(collect, (collect[i].prototype.ROYALE_CLASS_INFO.interfaces || [])); + data = collect[i].prototype.ROYALE_CLASS_INFO; + if (!data) continue; + collect.push.apply(collect, (data.interfaces || [])); } } else { var superClass:Object = def.superClass_; @@ -449,7 +451,8 @@ for (i=0;i<n;i++) { var iface:Object = collect[i]; data = iface.prototype.ROYALE_CLASS_INFO; - results[i] = TypeDefinition.getDefinition(data.names[0].qName,data); + if (!data) continue; + results.push(TypeDefinition.getDefinition(data.names[0].qName,data)); } } }