Fix a crash with the chart editor.
This commit is contained in:
@@ -214,10 +214,10 @@ class LoadingState extends MusicBeatSubState
|
||||
*/
|
||||
public static function loadPlayState(params:PlayStateParams, shouldStopMusic = false, asSubState = false, ?onConstruct:PlayState->Void):Void
|
||||
{
|
||||
var daChart = params.targetSong.getDifficulty(params.targetDifficulty ?? Constants.DEFAULT_DIFFICULTY,
|
||||
var daChart:Null<SongDifficulty> = params.targetSong.getDifficulty(params.targetDifficulty ?? Constants.DEFAULT_DIFFICULTY,
|
||||
params.targetVariation ?? Constants.DEFAULT_VARIATION);
|
||||
|
||||
var daStage = funkin.data.stage.StageRegistry.instance.fetchEntry(daChart.stage);
|
||||
var daStage = funkin.data.stage.StageRegistry.instance.fetchEntry(daChart?.stage ?? Constants.DEFAULT_STAGE);
|
||||
stageDirectory = daStage?._data?.directory ?? "shared";
|
||||
Paths.setCurrentLevel(stageDirectory);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user