Skip to content

Commit

Permalink
fix(updater): Be sure to check for case where there isn't an installer
Browse files Browse the repository at this point in the history
  • Loading branch information
Belphemur committed Apr 2, 2021
1 parent 9ee8db6 commit 4038b77
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion SoundSwitch/Framework/Updater/UpdateChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ private bool ProcessRelease(GitHubRelease serverRelease)
{
if (version > AppVersion)
{
var installer = serverRelease.assets.First(asset => asset.name.EndsWith(".exe"));
var installer = serverRelease.assets.SingleOrDefault(asset => asset.name.EndsWith(".exe"));
if (installer == null)
{
return false;
}
var release = new Release(version, installer, serverRelease.name);
release.Changelog.AddRange(changelog);
UpdateAvailable?.Invoke(this, new NewReleaseEvent(release));
Expand Down

0 comments on commit 4038b77

Please sign in to comment.