Fix a crash when stopping the world generator

This commit is contained in:
James Seibel
2023-05-27 12:28:59 -05:00
parent 0cd04df689
commit 013a293052
@@ -446,6 +446,12 @@ public class WorldGenerationQueue implements Closeable
this.inProgressGenTasksByLodPos.values().forEach(runningTaskGroup ->
{
CompletableFuture<Void> genFuture = runningTaskGroup.genFuture; // Do this to prevent it getting swapped out
if (genFuture == null)
{
// genFuture's shouldn't be null, but sometimes they are...
return;
}
if (cancelCurrentGeneration)
{