Skip to content

Commit

Permalink
Fix crash if YAMDCC updater couldn't be found when checking for updat…
Browse files Browse the repository at this point in the history
…es from config editor

- Code cleanup
  • Loading branch information
Sparronator9999 committed Jan 17, 2025
1 parent 6518d37 commit cfec250
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 10 additions & 3 deletions YAMDCC.ConfigEditor/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -625,9 +625,16 @@ private void tsiCheckUpdate_Click(object sender, EventArgs e)
{
Process.Start("updater", "--checkupdate");
}
catch (FileNotFoundException)
catch (Exception ex)
{
Utils.ShowError("Updater.exe not found!");
if (ex is Win32Exception or FileNotFoundException)
{
Utils.ShowError("Updater.exe not found!");
}
else
{
throw;
}
}
}
#endregion
Expand Down Expand Up @@ -977,7 +984,7 @@ private void FanModeChange(object sender, EventArgs e)
Config.FanModeConf.ModeSel = i;
ttMain.SetToolTip(cboFanMode,
Strings.GetString("ttFanMode", Config.FanModeConf.FanModes[i].Desc));
}
}

private void txtAuthor_Validating(object sender, CancelEventArgs e)
{
Expand Down
1 change: 0 additions & 1 deletion YAMDCC.ECInspector/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// YAMDCC. If not, see <https://www.gnu.org/licenses/>.

using System;
using System.Diagnostics;
using System.ServiceProcess;
using System.Threading;
using YAMDCC.Common;
Expand Down

0 comments on commit cfec250

Please sign in to comment.