Skip to content

Commit

Permalink
add missing null check for sidebar line
Browse files Browse the repository at this point in the history
  • Loading branch information
vytskalt committed Apr 9, 2024
1 parent 01d8ef9 commit 25f2363
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ public final boolean tick() {
} else if (task instanceof SidebarTask.UpdateScores) {
forEachLineHandler(LocaleLineHandler::updateScores);
for (GlobalLineInfo line : lines) {
line.updateScore(false);
if (line != null) {
line.updateScore(false);
}
}
} else if (task instanceof SidebarTask.UpdateTitle) {
packetAdapter.sendProperties(internalPlayers(), PropertiesPacketType.UPDATE, title, ObjectiveRenderType.INTEGER, ScoreFormat.blank());
Expand Down

0 comments on commit 25f2363

Please sign in to comment.