From 1ee2b2aac8310ba36a22ca959cf47f10f7b68192 Mon Sep 17 00:00:00 2001 From: Difegue Date: Wed, 4 Sep 2024 19:25:17 +0200 Subject: [PATCH] (#98) Fix windows crash when searching for albums too fast --- Sources/Stylophone/ViewModels/LibraryViewModel.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/Stylophone/ViewModels/LibraryViewModel.cs b/Sources/Stylophone/ViewModels/LibraryViewModel.cs index c4360c7..22598a5 100644 --- a/Sources/Stylophone/ViewModels/LibraryViewModel.cs +++ b/Sources/Stylophone/ViewModels/LibraryViewModel.cs @@ -62,6 +62,12 @@ public void RangesChanged(ItemIndexRange visibleRange, IReadOnlyList= this.Count) + { + // The collection changed while this task was queued up, give up + return; + } + var album = this[i]; await album.LoadAlbumArtFromCacheAsync(); }