You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2013/06/05 13:31:30 UTC
git commit: [flex-sdk] [refs/heads/develop] - FLEX-14181 stop RTE
from occurring
Updated Branches:
refs/heads/develop b4e0a4e82 -> 4878d2abc
FLEX-14181 stop RTE from occurring
Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/4878d2ab
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/4878d2ab
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/4878d2ab
Branch: refs/heads/develop
Commit: 4878d2abc17eb25f7ba459f5a7848a75cbf6f3fb
Parents: b4e0a4e
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Jun 5 21:31:11 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Jun 5 21:31:11 2013 +1000
----------------------------------------------------------------------
.../projects/mx/src/mx/containers/DividedBox.as | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4878d2ab/frameworks/projects/mx/src/mx/containers/DividedBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mx/src/mx/containers/DividedBox.as b/frameworks/projects/mx/src/mx/containers/DividedBox.as
index 843ec83..a426c8a 100644
--- a/frameworks/projects/mx/src/mx/containers/DividedBox.as
+++ b/frameworks/projects/mx/src/mx/containers/DividedBox.as
@@ -776,7 +776,7 @@ public class DividedBox extends Box
/**
* Returns a reference to the specified BoxDivider object
- * in this DividedBox container.
+ * in this DividedBox container or null if it doesn't exist.
*
* @param i Zero-based index of a divider, counting from
* the left for a horizontal DividedBox,
@@ -791,7 +791,16 @@ public class DividedBox extends Box
*/
public function getDividerAt(i:int):BoxDivider
{
- return BoxDivider(dividerLayer.getChildAt(i));
+ if (dividerLayer) {
+ // Check whether this is a valid divider index.
+ if (i < 0 || i >= numDividers)
+ return null;
+
+ return BoxDivider(dividerLayer.getChildAt(i));
+ }
+ else {
+ return null;
+ }
}
/**