新增模组载入异常

This commit is contained in:
Hakoyu 2023-11-24 15:38:15 +08:00
parent fff24cf87b
commit c6716aa8fe

View File

@ -245,13 +245,27 @@ public class ModMakerWindowVM
MessageBox.Show("模组载入失败:\n{0}".Translate(ex));
pendingHandler.Close();
}
if (loader is not null)
if (loader is null)
return;
ModInfoModel? modInfo = null;
try
{
var modInfo = new ModInfoModel(loader);
modInfo = new ModInfoModel(loader);
EditMod(modInfo);
pendingHandler.Close();
ModEditWindow.InitializeData();
}
catch (Exception ex)
{
pendingHandler.Close();
ModEditWindow?.Close();
ModMakerWindow.Show();
MessageBox.Show("模组载入失败:\n{0}".Translate(ex));
ModInfoModel.Current = null;
}
finally
{
pendingHandler.Close();
}
}
#endregion
}