Repository: flex-asjs
Updated Branches:
  refs/heads/develop bd8d9a88a -> 6c03ee3dd


Check for index out of bounds.


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

Branch: refs/heads/develop
Commit: 6c03ee3dd6c2002f263e711e4d3bf7cd733f14e7
Parents: bd8d9a8
Author: yishayw <yishayj...@hotmail.com>
Authored: Mon Dec 19 16:41:28 2016 +0200
Committer: yishayw <yishayj...@hotmail.com>
Committed: Mon Dec 19 16:41:28 2016 +0200

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/html/beads/AccordionView.as   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6c03ee3d/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AccordionView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AccordionView.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AccordionView.as
index c4f7da0..282eb67 100644
--- 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AccordionView.as
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AccordionView.as
@@ -67,7 +67,10 @@ package org.apache.flex.html.beads
                                if (!layout.flexibleChild)
                                {
                                        var model:ISelectionModel = 
StrandUtils.loadBead(ISelectionModel, "iBeadModel", host) as ISelectionModel;
-                                       layout.flexibleChild = 
(dataGroup.getItemRendererForIndex(model.selectedIndex) as IStyleableObject).id;
+                                       if (model.selectedIndex > -1)
+                                       {
+                                               layout.flexibleChild = 
(dataGroup.getItemRendererForIndex(model.selectedIndex) as IStyleableObject).id;
+                                       }
                                }
                                super.performLayout(event);
                        }

Reply via email to