From 0494ddb5063ff549803cb77ee89fb82cb08aabd0 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Mon, 12 Feb 2024 23:19:25 -0500 Subject: [PATCH] Fix crash in chart editor minimal Playtest --- source/funkin/play/PlayState.hx | 2 +- source/funkin/play/stage/Stage.hx | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index e9ead8bbe..c2b4e5fc2 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -1976,7 +1976,7 @@ class PlayState extends MusicBeatSubState // Mute vocals and play miss animation, but don't penalize. vocals.playerVolume = 0; - currentStage.getBoyfriend().playSingAnimation(holdNote.noteData.getDirection(), true); + if (currentStage != null && currentStage.getBoyfriend() != null) currentStage.getBoyfriend().playSingAnimation(holdNote.noteData.getDirection(), true); } } } diff --git a/source/funkin/play/stage/Stage.hx b/source/funkin/play/stage/Stage.hx index fc23b6ace..8c0a46d97 100644 --- a/source/funkin/play/stage/Stage.hx +++ b/source/funkin/play/stage/Stage.hx @@ -747,13 +747,7 @@ class Stage extends FlxSpriteGroup implements IPlayStateScriptedClass implements } } - public function onUpdate(event:UpdateScriptEvent) - { - if (FlxG.keys.justPressed.F3) - { - debugIconGroup.visible = !debugIconGroup.visible; - } - } + public function onUpdate(event:UpdateScriptEvent) {} public override function kill() {