Skip to content

Commit 6febe0c

Browse files
authored
Fixed a crash that would sometimes occur when deleting items from recycle bin (#7555)
1 parent c16ff0e commit 6febe0c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/Files/Helpers/ItemListDisplayHelpers/BulkConcurrentObservableCollection.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,11 @@ public void OrderOne(Func<List<T>, IEnumerable<T>> func, T item)
412412
}
413413

414414
Remove(item);
415-
Insert(result.IndexOf(item), item);
415+
var index = result.IndexOf(item);
416+
if (index != -1)
417+
{
418+
Insert(index, item);
419+
}
416420
}
417421

418422
int IList.Add(object value)

src/Files/Views/PaneHolderPage.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ public IShellPage ActivePaneOrColumn
144144
{
145145
get
146146
{
147-
if (ActivePane.IsColumnView)
147+
if (ActivePane != null && ActivePane.IsColumnView)
148148
{
149149
return (ActivePane.SlimContentPage as ColumnViewBrowser).ActiveColumnShellPage;
150150
}
151151

152-
return ActivePane;
152+
return ActivePane ?? PaneLeft;
153153
}
154154
}
155155

0 commit comments

Comments
 (0)