Skip to content

Commit 07994c3

Browse files
authored
Merge pull request phaserjs#2739 from samme/issue-2738
Test for `camera.fx` before resetting
2 parents e5c511b + b67073c commit 07994c3

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/core/Camera.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -784,9 +784,10 @@ Phaser.Camera.prototype = {
784784
*/
785785
resetFX: function () {
786786

787-
this.fx.clear();
788-
789-
this.fx.alpha = 0;
787+
if (this.fx) {
788+
this.fx.clear();
789+
this.fx.alpha = 0;
790+
}
790791

791792
this._fxDuration = 0;
792793

0 commit comments

Comments
 (0)