flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject [1/2] git commit: [flex-sdk] [refs/heads/develop] - Fix MenuBar.styleChanged() crash bug
Date Wed, 18 Nov 2015 17:37:44 GMT
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 31211c4a4 -> bf280863f


Fix MenuBar.styleChanged() crash bug

menuBarItems.length may be modified as a result of calling getMenuAt(), so we should not save
the length value before entering a loop.

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

Branch: refs/heads/develop
Commit: cfbcc4d552d7622bb865ed855c8bb61e52016f76
Parents: 129366b
Author: Andy Dufilie <andy.dufilie@gmail.com>
Authored: Tue Jul 15 12:27:41 2014 -0400
Committer: Andy Dufilie <andy.dufilie@gmail.com>
Committed: Tue Jul 15 12:27:41 2014 -0400

----------------------------------------------------------------------
 frameworks/projects/mx/src/mx/controls/MenuBar.as | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/cfbcc4d5/frameworks/projects/mx/src/mx/controls/MenuBar.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mx/src/mx/controls/MenuBar.as b/frameworks/projects/mx/src/mx/controls/MenuBar.as
index c4158b2..62ee1e2 100644
--- a/frameworks/projects/mx/src/mx/controls/MenuBar.as
+++ b/frameworks/projects/mx/src/mx/controls/MenuBar.as
@@ -1410,8 +1410,7 @@ public class MenuBar extends UIComponent implements IFocusManagerComponent
         var i:int;
         super.styleChanged(styleProp);
 
-        var n:int = menuBarItems.length;
-        for (i = 0; i < n; i++)
+        for (i = 0; i < menuBarItems.length; i++)
         {
             getMenuAt(i).styleChanged(styleProp);
         }
@@ -1447,8 +1446,7 @@ public class MenuBar extends UIComponent implements IFocusManagerComponent
     {
         super.notifyStyleChangeInChildren(styleProp, recursive);
 
-        var n:int = menuBarItems.length;
-        for (var i:int = 0; i < n; i++)
+        for (var i:int = 0; i < menuBarItems.length; i++)
         {
             getMenuAt(i).notifyStyleChangeInChildren(styleProp, recursive);
         }


Mime
View raw message