mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
Merge pull request #6421 from samme/fix/scene-shutdown-loader
Fix error stopping a scene without a loader
This commit is contained in:
commit
6282d89f17
1 changed files with 5 additions and 2 deletions
|
@ -1296,8 +1296,11 @@ var SceneManager = new Class({
|
|||
{
|
||||
var loader = scene.sys.load;
|
||||
|
||||
loader.off(LoaderEvents.COMPLETE, this.loadComplete, this);
|
||||
loader.off(LoaderEvents.COMPLETE, this.payloadComplete, this);
|
||||
if (loader)
|
||||
{
|
||||
loader.off(LoaderEvents.COMPLETE, this.loadComplete, this);
|
||||
loader.off(LoaderEvents.COMPLETE, this.payloadComplete, this);
|
||||
}
|
||||
|
||||
scene.sys.shutdown(data);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue