mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-23 08:07:54 -05:00
Fix an issue where a missing stage would cause a crash (rather than an error popup)
This commit is contained in:
parent
ea1d123c49
commit
b464f51ba2
1 changed files with 2 additions and 1 deletions
|
@ -1551,10 +1551,11 @@ class PlayState extends MusicBeatSubState
|
|||
function loadStage(id:String):Void
|
||||
{
|
||||
currentStage = StageRegistry.instance.fetchEntry(id);
|
||||
currentStage.revive(); // Stages are killed and props destroyed when the PlayState is destroyed to save memory.
|
||||
|
||||
if (currentStage != null)
|
||||
{
|
||||
currentStage.revive(); // Stages are killed and props destroyed when the PlayState is destroyed to save memory.
|
||||
|
||||
// Actually create and position the sprites.
|
||||
var event:ScriptEvent = new ScriptEvent(CREATE, false);
|
||||
ScriptEventDispatcher.callEvent(currentStage, event);
|
||||
|
|
Loading…
Reference in a new issue