Skip to content

Commit

Permalink
Fix NPE when using two APs.
Browse files Browse the repository at this point in the history
  • Loading branch information
patfair committed Oct 21, 2023
1 parent ab0cabf commit 7b4d49e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion network/access_point.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,14 @@ func (ap *AccessPoint) configIsCorrectForTeams(teams [6]*model.Team) bool {

for i, team := range teams {
expectedTeamId := 0
actualTeamId := 0
if team != nil {
expectedTeamId = team.Id
}
if ap.TeamWifiStatuses[i].TeamId != expectedTeamId {
if ap.TeamWifiStatuses[i] != nil {
actualTeamId = ap.TeamWifiStatuses[i].TeamId
}
if actualTeamId != expectedTeamId {
return false
}
}
Expand Down

0 comments on commit 7b4d49e

Please sign in to comment.