mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
ChunkCache: fixed possible undefined offset crash in restartPendingRequest()
This commit is contained in:
parent
137245ed7b
commit
9a31cbf5ef
@ -132,7 +132,7 @@ class ChunkCache implements ChunkListener{
|
||||
*/
|
||||
private function restartPendingRequest(int $chunkX, int $chunkZ) : void{
|
||||
$chunkHash = World::chunkHash($chunkX, $chunkZ);
|
||||
$existing = $this->caches[$chunkHash];
|
||||
$existing = $this->caches[$chunkHash] ?? null;
|
||||
if($existing === null or $existing->hasResult()){
|
||||
throw new \InvalidArgumentException("Restart can only be applied to unresolved promises");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user