Skip to content

Commit

Permalink
Fix a few potential nulls
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Oct 5, 2023
1 parent 2b3e8ae commit 1e3fd0e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private void load(RulesetStore rulesets)
{
var ruleset = rulesets.GetRuleset(Score.SoloScore.RulesetID) ?? throw new InvalidOperationException();
return new ModIcon(ruleset.CreateInstance().CreateModFromAcronym(mod.Acronym))
return new ModIcon(ruleset.CreateInstance().CreateModFromAcronym(mod.Acronym)!)
{
Scale = new Vector2(0.35f)
};
Expand Down
2 changes: 1 addition & 1 deletion PerformanceCalculatorGUI/Configuration/SettingsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override void InitialiseDefaults()
SetDefault(Settings.ClientId, string.Empty);
SetDefault(Settings.ClientSecret, string.Empty);
SetDefault(Settings.DefaultPath, Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
SetDefault(Settings.CachePath, Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "cache"));
SetDefault(Settings.CachePath, Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "cache"));
}
}
}
2 changes: 1 addition & 1 deletion PerformanceCalculatorGUI/Screens/SimulateScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ private void calculatePerformance()
var beatmap = working.GetPlayableBeatmap(ruleset.Value, appliedMods.Value);

var accuracy = accuracyTextBox.Value.Value / 100.0;
Dictionary<HitResult, int> statistics = null;
Dictionary<HitResult, int> statistics = new Dictionary<HitResult, int>();

if (ruleset.Value.OnlineID != -1)
{
Expand Down

0 comments on commit 1e3fd0e

Please sign in to comment.