diff --git a/source/game/SoundGroup.hx b/source/game/SoundGroup.hx index 07fce0b86b..8ffb0097c9 100644 --- a/source/game/SoundGroup.hx +++ b/source/game/SoundGroup.hx @@ -65,7 +65,9 @@ class SoundGroup extends FlxTypedContainer { function set_volume(volume:Float):Float { this.volume = volume; for (sound in members) { - sound.volume = volume; + if(sound != null){ + sound.volume = volume; + } } return volume; } @@ -73,7 +75,9 @@ class SoundGroup extends FlxTypedContainer { function set_time(time:Float):Float { this.time = time; for (sound in members) { - sound.time = time; + if(sound != null){ + sound.time = time; + } } return time; } @@ -82,7 +86,10 @@ class SoundGroup extends FlxTypedContainer { function set_pitch(pitch:Float):Float { this.pitch = pitch; for (sound in members) { + if(sound != null){ + sound.pitch = pitch; + } } return pitch; } @@ -91,7 +98,7 @@ class SoundGroup extends FlxTypedContainer { function get_maxLength():Float { var m:Float = 0.0; for (sound in members) { - if (sound.length > m) { + if (sound != null && sound.length > m) { m = sound.length; } } diff --git a/source/toolbox/ChartingState.hx b/source/toolbox/ChartingState.hx index c5c6c7eb42..10473eee34 100644 --- a/source/toolbox/ChartingState.hx +++ b/source/toolbox/ChartingState.hx @@ -1610,7 +1610,7 @@ class ChartingState extends MusicBeatState { } function changeSection(sec:Int = 0, ?updateMusic:Bool = true):Void { - trace('changing section' + sec); + //trace('changing section' + sec); if (_song.notes[sec] != null) { curSection = sec;