Check max size of grid

This commit is contained in:
hodasemi 2023-01-19 18:08:13 +01:00
parent 5300efff51
commit 8c5accd92c

View file

@ -131,7 +131,9 @@ impl LeaderBoard {
write_log!("create entries");
// check if entry count in grid is the same as the gathered entries
// that means some joined or left the game
let force_update = if !self.leaderboard_entries.is_empty()
&& self.leaderboard_entries.len() <= self.leaderboard_grid.dimensions().1
&& self
.leaderboard_grid
.child_at(0, self.leaderboard_entries.len() - 1)?