mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-11 22:08:42 +00:00
TimingsHandler: throw on attempt to stop timer that is not running
I do not think that this bug is in effect in the core code, but I can't be sure.
This commit is contained in:
parent
8726604899
commit
d83820477f
@ -168,6 +168,9 @@ class TimingsHandler{
|
||||
|
||||
public function stopTiming(){
|
||||
if(self::$enabled){
|
||||
if($this->timingDepth === 0){
|
||||
throw new \InvalidStateException("Cannot stop a timer that is not running");
|
||||
}
|
||||
if(--$this->timingDepth !== 0 or $this->start == 0){
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user