Skip to content

Commit

Permalink
Improve few null checks
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeye116477 committed Jan 10, 2024
1 parent 2d9ebec commit 8680e1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/LegendaryGameController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,15 @@ public override async void Play(PlayActionArgs args)
playArgs.Add("--skip-version-check");
}
}
if (gameSettings?.StartupArguments != null)
if (gameSettings.StartupArguments?.Any() == true)
{
playArgs.AddRange(gameSettings.StartupArguments);
}
if (gameSettings?.LanguageCode != null)
if (!gameSettings.LanguageCode.IsNullOrEmpty())
{
playArgs.AddRange(new[] { "--language", gameSettings.LanguageCode } );
}
if (gameSettings?.OverrideExe != null)
if (!gameSettings.OverrideExe.IsNullOrEmpty())
{
playArgs.AddRange(new[] { "--override-exe", gameSettings?.OverrideExe });
}
Expand Down

0 comments on commit 8680e1c

Please sign in to comment.