Merge pull request #4709 from OLDRedstone/main

修复因未使用模组列表搜索并尝试移除搜索结果导致的异常#4691
This commit is contained in:
龙腾猫跃
2024-09-19 18:14:27 +08:00
committed by GitHub
@@ -647,7 +647,7 @@
SelectedMods.Remove(ModEntity.RawFileName)
'更改 Loader 和 UI 中的列表
McModLoader.Output.Remove(ModEntity)
SearchResult.Remove(ModEntity)
SearchResult?.Remove(ModEntity)
ModItems.Remove(ModEntity.RawFileName)
Dim IndexOfUi As Integer = PanList.Children.IndexOf(PanList.Children.OfType(Of MyLocalModItem).FirstOrDefault(Function(i) i.Entry.Equals(ModEntity)))
If IndexOfUi >= 0 Then PanList.Children.RemoveAt(IndexOfUi)