mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Possible fix for #2041
This commit is contained in:
@ -119,7 +119,7 @@ class ServerScheduler{
|
||||
* @param int $taskId
|
||||
*/
|
||||
public function cancelTask($taskId){
|
||||
if(isset($this->tasks[$taskId])){
|
||||
if($taskId !== null and isset($this->tasks[$taskId])){
|
||||
$this->tasks[$taskId]->cancel();
|
||||
unset($this->tasks[$taskId]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user