Skip to content

Commit

Permalink
Catch nil in sc2 (#3328)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjpalpha authored Sep 27, 2023
1 parent b86d0df commit acf1c36
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ function StarcraftMatchGroupUtil.computeOffraces(gameOpponent, referenceOpponent
local gameRaces = {}
local hasOffrace = false
for playerIx, gamePlayer in ipairs(gameOpponent.players) do
local referencePlayer = referenceOpponent.players[playerIx]
local referencePlayer = referenceOpponent.players[playerIx] or {}
table.insert(gameRaces, gamePlayer.race)
if gamePlayer.race ~= referencePlayer.race then
hasOffrace = true
Expand Down

0 comments on commit acf1c36

Please sign in to comment.