Handles case where Group et al may not have a layout.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/0fc2115c Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/0fc2115c Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/0fc2115c Branch: refs/heads/dual Commit: 0fc2115c4d4ca317f28ee4907dd179675cf590bb Parents: 87efeed Author: Peter Ent <[email protected]> Authored: Thu Apr 13 10:32:19 2017 -0400 Committer: Peter Ent <[email protected]> Committed: Thu Apr 13 10:32:19 2017 -0400 ---------------------------------------------------------------------- .../HTML/src/main/flex/org/apache/flex/core/GroupBase.as | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0fc2115c/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/GroupBase.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/GroupBase.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/GroupBase.as index 815101a..07859a1 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/GroupBase.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/GroupBase.as @@ -109,8 +109,11 @@ package org.apache.flex.core var layout:IBeadLayout = getBeadByType(IBeadLayout) as IBeadLayout; if (!layout) { - layout = new (ValuesManager.valuesImpl.getValue(this, "iBeadLayout")) as IBeadLayout; - addBead(layout); + var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadLayout") as Class; + if (c) { + layout = new c() as IBeadLayout; + addBead(layout); + } } }
