Prechádzať zdrojové kódy

Merge pull request #4709 from OLDRedstone/main

修复因未使用模组列表搜索并尝试移除搜索结果导致的异常#4691
龙腾猫跃 2 rokov pred
rodič
commit
3606a834c0

+ 1 - 1
Plain Craft Launcher 2/Pages/PageVersion/PageVersionMod.xaml.vb

@@ -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)