mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 19:59:11 +00:00
PopulationTask: don't assume anything about TLS return values
while these SHOULD be what we say they are, it's possible for something else to overwrite them with junk and make the server catch fire.
This commit is contained in:
@@ -56,11 +56,9 @@ class PopulationTask extends AsyncTask{
|
||||
}
|
||||
|
||||
public function onRun(){
|
||||
/** @var SimpleChunkManager $manager */
|
||||
$manager = $this->getFromThreadStore("generation.level{$this->levelId}.manager");
|
||||
/** @var Generator $generator */
|
||||
$generator = $this->getFromThreadStore("generation.level{$this->levelId}.generator");
|
||||
if($manager === null or $generator === null){
|
||||
if(!($manager instanceof SimpleChunkManager) or !($generator instanceof Generator)){
|
||||
$this->state = false;
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user