odd crashfix for the charternotegrp forEach()

This commit is contained in:
⍚~Nex
2024-03-25 22:18:37 +01:00
parent eb7b6f0841
commit 266a04af97
@@ -29,11 +29,11 @@ class CharterNoteGroup extends FlxTypedGroup<CharterNote> {
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;
}