Skip to content

Commit

Permalink
Added exception handler to the HandleConfigs() private method of the …
Browse files Browse the repository at this point in the history
…FrmMainW class.
  • Loading branch information
xvitaly committed Sep 8, 2024
1 parent 0164a83 commit 722cbc3
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/srcrepair/FrmMainW.cs
Original file line number Diff line number Diff line change
Expand Up @@ -858,9 +858,17 @@ private void ShowVariableDescription(string Variable)
/// </summary>
private void HandleConfigs()
{
if (!Directory.Exists(App.AppCfgDir)) { Directory.CreateDirectory(App.AppCfgDir); }
App.SourceGames[AppSelector.Text].FPSConfigs = ConfigManager.ListFPSConfigs(App.SourceGames[AppSelector.Text].FullGamePath, App.SourceGames[AppSelector.Text].IsUsingUserDir);
GT_Warning.Visible = App.SourceGames[AppSelector.Text].FPSConfigs.Count > 0;
try
{
if (!Directory.Exists(App.AppCfgDir)) { Directory.CreateDirectory(App.AppCfgDir); }
App.SourceGames[AppSelector.Text].FPSConfigs = ConfigManager.ListFPSConfigs(App.SourceGames[AppSelector.Text].FullGamePath, App.SourceGames[AppSelector.Text].IsUsingUserDir);
GT_Warning.Visible = App.SourceGames[AppSelector.Text].FPSConfigs.Count > 0;
}
catch (Exception Ex)
{
Logger.Warn(Ex, DebugStrings.AppDbgExHandleConfigs);
GT_Warning.Visible = false;
}
}

/// <summary>
Expand Down

0 comments on commit 722cbc3

Please sign in to comment.