Fix a crash for inst only songs

This commit is contained in:
ComedyLost
2026-03-10 04:33:14 -05:00
committed by AbnormalPoof
parent efc33403b6
commit 7075c8af4b
@@ -95,9 +95,13 @@ class ChartEditorImportExportHandler
if (playerVoiceList.length == 0 && opponentVoiceList.length == 0) // Legacy support...
{
var suffix:String = (instId != null && instId != '' && instId != 'default') ? '-$instId' : '';
state.loadVocalsFromAsset(Paths.voices(diff.song.id, suffix), diff.characters.player, instId);
state.audioVocalTrackGroup.legacyVoiceSystem = true;
state.audioVocalTrackGroup.legacyVoiceUsesPlayer = true;
var voiceFile = Paths.voices(diff.song.id, suffix);
if (Assets.exists(voiceFile))
{
state.loadVocalsFromAsset(voiceFile, diff.characters.player, instId);
state.audioVocalTrackGroup.legacyVoiceSystem = true;
state.audioVocalTrackGroup.legacyVoiceUsesPlayer = true;
}
}
// Set the difficulty of the song if one was passed in the params, and it isn't the default