`Cannot read property 'loadUpdate' of null` when destroying the game too early
jf-m opened this issue · comments
This Issue is about
- A bug in the API:
- Phaser version(s): 2.15.0
- Live example: /
- What steps produce the bug: Load and destroy the scene before the loader has finised loading the assets
- What should happen: No error should be thrown
- What happens instead: An error is thrown
- If there's an error:
- What's the error message?
Cannot read property 'loadUpdate' of null
- What's the error trace (expand the error message)?
Phaser.Loader.finishedLoading
- What's the error message?
Hello and thank you for maintaining this repo !
This problem comes from the following line :
https://github.com/photonstorm/phaser-ce/blob/8f6296def883334faefa4aaf618c81eac4c3a7f3/src/loader/Loader.js#L2181
I think an if
statement should be placed at this place, exactly the same way as 3 lines after :
Indeed, the case is well handled on loadComplete
but not on loadUpdate
.
Thank you very much, hope this helps