diff --git a/source/SongLoad.hx b/source/SongLoad.hx index 94495821a..bcc2200b3 100644 --- a/source/SongLoad.hx +++ b/source/SongLoad.hx @@ -145,12 +145,13 @@ class SongLoad */ public static function castArrayToNoteData(noteStuff:Array) { + if (noteStuff == null) + return; + for (sectionIndex => section in noteStuff) { for (noteIndex => noteDataArray in section.sectionNotes) { - trace(noteDataArray); - var arrayDipshit:Array = cast noteDataArray; // crackhead // at this point noteStuff[sectionIndex].sectionNotes[noteIndex] is an array because of the cast from the first line in this function @@ -170,6 +171,9 @@ class SongLoad */ public static function castNoteDataToArray(noteStuff:Array) { + if (noteStuff == null) + return; + for (sectionIndex => section in noteStuff) { for (noteIndex => noteTypeDefShit in section.sectionNotes) diff --git a/source/charting/ChartingState.hx b/source/charting/ChartingState.hx index fad68f539..0a80d9a4a 100644 --- a/source/charting/ChartingState.hx +++ b/source/charting/ChartingState.hx @@ -6,6 +6,7 @@ import Section.SwagSection; import SongLoad.SwagSong; import flixel.FlxSprite; import flixel.addons.display.FlxGridOverlay; +import flixel.addons.transition.FlxTransitionableState; import flixel.addons.ui.FlxInputText; import flixel.addons.ui.FlxUI; import flixel.addons.ui.FlxUICheckBox; @@ -216,6 +217,8 @@ class ChartingState extends MusicBeatState var reloadSongJson:FlxButton = new FlxButton(reloadSong.x, saveButton.y + 30, "Reload JSON", function() { + FlxTransitionableState.skipNextTransIn = true; + FlxTransitionableState.skipNextTransOut = true; loadJson(_song.song.toLowerCase()); });