This is an automated email from the ASF dual-hosted git repository.
piotrz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new a2fc29b Jewel ListView: Fix issue where making dataProvider = null to
any component which is using ListView bead causes NPE
a2fc29b is described below
commit a2fc29b2905fca2ad72ff8147851683d6c85083e
Author: Piotr Zarzycki <[email protected]>
AuthorDate: Fri Dec 4 12:29:03 2020 +0100
Jewel ListView: Fix issue where making dataProvider = null to any component
which is using ListView bead causes NPE
---
.../src/main/royale/org/apache/royale/jewel/beads/views/ListView.as | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ListView.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ListView.as
index 473d9b4..b33a069 100644
---
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ListView.as
+++
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ListView.as
@@ -188,6 +188,8 @@ package org.apache.royale.jewel.beads.views
*/
public function scrollToIndex(index:int):Boolean
{
+ if (index == -1) return false;
+
var scrollArea:HTMLElement = (_strand as
IStyledUIBase).element;
var oldScroll:Number = scrollArea.scrollTop;