flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mkess...@apache.org
Subject git commit: [flex-sdk] - FLEX-33526: Added null test for values array.
Date Sun, 28 Apr 2013 12:06:26 GMT
Updated Branches:
  refs/heads/develop 55b14753e -> 376417244


FLEX-33526: Added null test for values array.


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

Branch: refs/heads/develop
Commit: 37641724467bc9df5299b0f0ead8052a4e28997a
Parents: 55b1475
Author: Mark Kessler <KesslerConsulting@gmail.com>
Authored: Sun Apr 28 08:04:15 2013 -0400
Committer: Mark Kessler <KesslerConsulting@gmail.com>
Committed: Sun Apr 28 08:05:56 2013 -0400

----------------------------------------------------------------------
 .../projects/spark/src/spark/components/Grid.as    |    5 +++--
 .../spark/components/supportClasses/ListBase.as    |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/37641724/frameworks/projects/spark/src/spark/components/Grid.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/Grid.as b/frameworks/projects/spark/src/spark/components/Grid.as
index be40673..b19e86f 100644
--- a/frameworks/projects/spark/src/spark/components/Grid.as
+++ b/frameworks/projects/spark/src/spark/components/Grid.as
@@ -4822,14 +4822,15 @@ public class Grid extends Group implements IDataGridElement, IDataProviderEnhanc
         var regexList:Array = [];
         var matchedIndices:Array = [];
         var dataProviderTotal:uint = 0;
-        var valuesTotal:uint = values.length;
+        var valuesTotal:uint = 0;
         var loopingDataProviderIndex:uint = 0;
         var loopingValuesIndex:uint = 0;
 
 
-        if (dataProvider && dataProvider.length > 0 && valuesTotal >
0)
+        if (dataProvider && dataProvider.length > 0 && values != null
&& values.length > 0)
         {
             dataProviderTotal = dataProvider.length;
+            valuesTotal = values.length;
 
 
             //Set the regex patterns in an array once.

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/37641724/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as b/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
index 5f737f4..120018b 100644
--- a/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ b/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -1284,14 +1284,15 @@ public class ListBase extends SkinnableDataContainer implements IDataProviderEnh
         var regexList:Array = [];
         var matchedIndices:Array = [];
         var dataProviderTotal:uint = 0;
-        var valuesTotal:uint = values.length;
+        var valuesTotal:uint = 0;
         var loopingDataProviderIndex:uint = 0;
         var loopingValuesIndex:uint = 0;
 
 
-        if (dataProvider && dataProvider.length > 0 && valuesTotal >
0)
+        if (dataProvider && dataProvider.length > 0 && values != null
&& values.length > 0)
         {
             dataProviderTotal = dataProvider.length;
+            valuesTotal = values.length;
 
 
             //Set the regex patterns in an array once.


Mime
View raw message