fixed potential nil pointer
This commit is contained in:
@@ -166,6 +166,10 @@ func (p *DemoParser) getMatchPlayerBySteamID(stats []*ent.MatchPlayer, steamId u
|
||||
}
|
||||
|
||||
func setMatchPlayerColor(matchPlayer *ent.MatchPlayer, demoPlayer *common.Player) {
|
||||
if matchPlayer == nil || demoPlayer == nil {
|
||||
return
|
||||
}
|
||||
|
||||
matchPlayer.Crosshair = demoPlayer.CrosshairCode()
|
||||
switch demoPlayer.Color() {
|
||||
case common.Yellow:
|
||||
|
Reference in New Issue
Block a user