Skip to content

Commit

Permalink
Fixes a crash onDisable in situations when task was already cancelled.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed May 8, 2022
1 parent d190caf commit bd19401
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/world/bentobox/biomes/BiomesAddon.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,11 @@ public void onDisable()
{
if (this.hooked)
{
this.biomeUpdateQueue.getTask().cancel();
if (this.biomeUpdateQueue != null)
{
this.biomeUpdateQueue.getTask().cancel();
}

this.getLogger().info("Biomes addon disabled.");
}
}
Expand Down

0 comments on commit bd19401

Please sign in to comment.