Hi Carlos,

Yes that is a null check, but I was also wondering whether actually fix
shouldn’t be a check of

If (index == -1) return false at the beginning of the function.

It will for sure fix issue but what may implications be.

On Wed, 2 Dec 2020 at 22:52, Carlos Rovira <[email protected]> wrote:

> Hi Piotr,
>
> since you have a use case to test and TDJ, can you add a patch yourself?
> for what you say it seems something to check for null or something like
> that?
> If you need more help I can take a look, but I'm these days a bit busy
>
> thanks
>
>
>
> El mié, 2 dic 2020 a las 21:43, Piotr Zarzycki (<[email protected]
> >)
> escribió:
>
> > Hello Carlos,
> >
> > With newest update in Royale we are getting NPE in following line of code
> > [1]
> >
> > Essentially dataProvider is null here [1].
> >
> > Scenario is following:
> > 1) Add DataGrid with couple of items
> > 2) Once it's displayed set dataProvider = null
> >
> > In that case scrollToIndex gets -1 - it will be called with
> > scrollToIndex(-1) and variableRowHeight = false. That part [1] of the
> code
> > will be called and nulled dataProvider - causes mentioned issue.
> >
> > [1]
> >
> >
> https://github.com/apache/royale-asjs/blob/7ab8307b561712560b675e31b0e6e1e71fa05d78/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ListView.as#L215
> >
> > Thanks,
> > --
> >
> > Piotr Zarzycki
> >
>
>
> --
> Carlos Rovira
> Apache Member & Apache Royale PMC
> *Apache Software Foundation*
> http://about.me/carlosrovira
>
-- 

Piotr Zarzycki

Reply via email to