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
jschenke488 committed Oct 29, 2024
1 parent 48449c9 commit 440d983
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 @@ -191,10 +191,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 440d983

Please sign in to comment.