World: remove the fulfilled promise from the population request map

fixes crash when unregistering chunk loaders
This commit is contained in:
Dylan K. Taylor 2021-10-31 23:05:12 +00:00
parent bd60e41268
commit 74031d2fbe
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -2870,6 +2870,7 @@ class World implements ChunkManager{
//chunk is already populated; return a pre-resolved promise that will directly fire callbacks assigned
$resolver ??= new PromiseResolver();
unset($this->chunkPopulationRequestMap[$index]);
$resolver->resolve($chunk);
return $resolver->getPromise();
}