Skip to content

Commit

Permalink
fix null exceptions if no stat weights are set
Browse files Browse the repository at this point in the history
  • Loading branch information
cadon committed Feb 4, 2024
1 parent 43c85d7 commit 72a087f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ARKBreedingStats/Form1.library.cs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ private void CalculateTopStats(List<Creature> creatures)
var statPreferences = new StatWeighting.StatValuePreference[Stats.StatsCount];
for (int s = 0; s < Stats.StatsCount; s++)
{
var statWeight = statWeights.Item1[s];
var statWeight = statWeights.Item1?[s] ?? 1;
statPreferences[s] = statWeight > 0 ? StatWeighting.StatValuePreference.High :
statWeight < 0 ? StatWeighting.StatValuePreference.Low :
StatWeighting.StatValuePreference.Indifferent;
Expand Down

0 comments on commit 72a087f

Please sign in to comment.