Open
Description
Describe the bug
We recently hit a bug in the Microsoft Store where ListViewExtensions.SmoothScrollIntoViewWithIndexAsync
can throw a NullReferenceException
if target SelectorItem
is null
. The issue is this line:
The issue is the returned selector can still be null
, as ContainerFromIndex
isn't guaranteed to return a not null
value. This might happen in some weird corner cases eg. when a page is being unloaded or similar. The extension should likely just check that and do nothing if that's the case.
Regression
No
Windows Build Number
- Windows 10 1809 (Build 17763)
- Windows 10 1903 (Build 18362)
- Windows 10 1909 (Build 18363)
- Windows 10 2004 (Build 19041)
- Windows 10 20H2 (Build 19042)
- Windows 10 21H1 (Build 19043)
- Windows 11 21H2 (Build 22000)
- Other (specify)
Visual Studio Version
2022
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status