Skip to content

Commit 11ea132

Browse files
committed
Provide a default player stats dict for obs/refs. Fixes #85
1 parent 0d392d4 commit 11ea132

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sc2reader/resources.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ def load_players(self):
982982
if not struct[0][1]: continue # Slot is closed
983983

984984
player = PlayerSummary(struct[0][0])
985-
stats = self.player_stats[index]
985+
stats = self.player_stats.get(index, dict())
986986
settings = self.player_settings[index]
987987
player.is_ai = not isinstance(struct[0][1], dict)
988988
if not player.is_ai:

0 commit comments

Comments
 (0)