Skip to content

Commit 8ef403c

Browse files
committed
Timer checks now for running inside while loop. Any event which causes a call to Timer#stop is now safe.
1 parent e88b103 commit 8ef403c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/time/Timer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ Phaser.Timer.prototype = {
327327
{
328328
this._i = 0;
329329

330-
while (this._i < this._len)
330+
while (this._i < this._len && this.running)
331331
{
332332
if (this._now >= this.events[this._i].tick)
333333
{

0 commit comments

Comments
 (0)