fix crashing on tutorial

This commit is contained in:
KadeDeveloper 2021-08-04 15:07:26 -07:00
parent cd32686863
commit bbd8599c46

View File

@ -3232,6 +3232,7 @@ class PlayState extends MusicBeatState
function endSong():Void function endSong():Void
{ {
endingSong = true;
FlxG.stage.removeEventListener(KeyboardEvent.KEY_DOWN, handleInput); FlxG.stage.removeEventListener(KeyboardEvent.KEY_DOWN, handleInput);
FlxG.stage.removeEventListener(KeyboardEvent.KEY_UP, releaseInput); FlxG.stage.removeEventListener(KeyboardEvent.KEY_UP, releaseInput);
if (useVideo) if (useVideo)
@ -4442,7 +4443,7 @@ class PlayState extends MusicBeatState
} }
#end #end
if (curSong == 'Tutorial' && dad.curCharacter == 'gf') if (curSong == 'Tutorial' && dad.curCharacter == 'gf' && SONG.notes[Math.floor(curStep / 16)] != null)
{ {
if (SONG.notes[Math.floor(curStep / 16)].mustHitSection) if (SONG.notes[Math.floor(curStep / 16)].mustHitSection)
dad.dance(); dad.dance();