Skip to content

update() hold reference to member#295

Open
fixermark wants to merge 1 commit intogamelab:masterfrom
fixermark:patch-1
Open

update() hold reference to member#295
fixermark wants to merge 1 commit intogamelab:masterfrom
fixermark:patch-1

Conversation

@fixermark
Copy link
Copy Markdown

Hold reference to member in members array while acting on it. This avoids a buggy corner-case where members[i].update() could change the number of members in this Group, resulting in the members[i].exists check referencing a different member (and possibly crashing on members[i] being undefined).

Hold reference to member in members array while acting on it. This avoids a buggy corner-case where member.update() could change the number of members in this Group, resulting in the "members[i].exists" check referencing a different member (and possibly crashing on members[i] being undefined).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant