Skip to content

Commit

Permalink
fix startup launch game card crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightczx committed Jan 3, 2024
1 parent a30c8d8 commit 8fb831e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Snap.Hutao/Snap.Hutao/ViewModel/Game/LaunchGameShared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@ internal static class LaunchGameShared
{
public static LaunchScheme? GetCurrentLaunchSchemeFromConfigFile(IGameServiceFacade gameService, IInfoBarService infoBarService)
{
ChannelOptions options = gameService.GetChannelOptions();
ChannelOptions options;
try
{
options = gameService.GetChannelOptions();
}
catch (InvalidOperationException)
{
return default;
}

if (string.IsNullOrEmpty(options.ConfigFilePath))
{
try
Expand Down

0 comments on commit 8fb831e

Please sign in to comment.