Skip to content

Commit

Permalink
Fix null pointer when stopping chunk pregeneration (#1514)
Browse files Browse the repository at this point in the history
  • Loading branch information
gigabit101 authored Sep 5, 2024
1 parent 6585d89 commit 1ab0f19
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ private static int stopGeneration(CommandSourceStack source) {
double percent = (double) count / total * 100.0;
source.sendSuccess(() -> Component.translatable("commands.neoforge.chunkgen.stopped", count, total, percent), true);

generationBar.close();
generationBar = null;
if (generationBar != null) {
generationBar.close();
generationBar = null;
}
activeTask = null;
} else {
source.sendSuccess(() -> Component.translatable("commands.neoforge.chunkgen.not_running"), false);
Expand Down

0 comments on commit 1ab0f19

Please sign in to comment.