Fix Null object Reference (#337)
* Fix Null object Reference When you pause in a specific time in the countdown (when the countdown is finishing) it crashs. I just added a null check for the song to fix it. * Update PlayState.hx
This commit is contained in:
@@ -1260,7 +1260,7 @@ class PlayState extends MusicBeatState
|
||||
if (Conductor.songPosition >= 0)
|
||||
startSong();
|
||||
}
|
||||
} else {
|
||||
} else if (FlxG.sound.music != null) {
|
||||
var instTime = FlxG.sound.music.time;
|
||||
var isOffsync = vocals.time != instTime || [for(strumLine in strumLines.members) strumLine.vocals.time != instTime].contains(true);
|
||||
__vocalOffsetViolation = Math.max(0, __vocalOffsetViolation + (isOffsync ? elapsed : -elapsed / 2));
|
||||
|
||||
Reference in New Issue
Block a user