mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-11-28 15:26:12 +00: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
|
|
@ -1551,10 +1551,11 @@ class PlayState extends MusicBeatSubState
|
||||||
function loadStage(id:String):Void
|
function loadStage(id:String):Void
|
||||||
{
|
{
|
||||||
currentStage = StageRegistry.instance.fetchEntry(id);
|
currentStage = StageRegistry.instance.fetchEntry(id);
|
||||||
currentStage.revive(); // Stages are killed and props destroyed when the PlayState is destroyed to save memory.
|
|
||||||
|
|
||||||
if (currentStage != null)
|
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.
|
// Actually create and position the sprites.
|
||||||
var event:ScriptEvent = new ScriptEvent(CREATE, false);
|
var event:ScriptEvent = new ScriptEvent(CREATE, false);
|
||||||
ScriptEventDispatcher.callEvent(currentStage, event);
|
ScriptEventDispatcher.callEvent(currentStage, event);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue