Fixed a rare crash if still subscribed to items PropertyChanged event and it gets triggered
This commit is contained in:
Родитель
e7bc38fef6
Коммит
ca84f1bf98
|
@ -469,6 +469,12 @@ namespace Microsoft.Toolkit.Uwp.UI
|
|||
{
|
||||
var oldIndex = _view.IndexOf(item);
|
||||
|
||||
// Check if item is in view:
|
||||
if (oldIndex < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_view.RemoveAt(oldIndex);
|
||||
var targetIndex = _view.BinarySearch(item, this);
|
||||
if (targetIndex < 0)
|
||||
|
|
Загрузка…
Ссылка в новой задаче