From 266a04af97d360429abccd3a2382a5fa27d37fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=8D=9A=7ENex?= <87421482+NexIsDumb@users.noreply.github.com> Date: Mon, 25 Mar 2024 22:18:37 +0100 Subject: [PATCH] odd crashfix for the charternotegrp forEach() --- source/funkin/editors/charter/CharterNoteGroup.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/funkin/editors/charter/CharterNoteGroup.hx b/source/funkin/editors/charter/CharterNoteGroup.hx index 66530af1..4c9a1d87 100644 --- a/source/funkin/editors/charter/CharterNoteGroup.hx +++ b/source/funkin/editors/charter/CharterNoteGroup.hx @@ -29,11 +29,11 @@ class CharterNoteGroup extends FlxTypedGroup { for(i in begin...end) { __loopSprite = members[i]; - if (!Charter.selection.contains(__loopSprite)) + if (__loopSprite != null && !Charter.selection.contains(__loopSprite)) noteFunc(__loopSprite); } for(c in Charter.selection.copy()) - if (c is CharterNote) noteFunc(cast (c, CharterNote)); + if (c != null && c is CharterNote) noteFunc(cast (c, CharterNote)); __currentlyLooping = oldCur; }