Fixed music player issues with handling repeat tracks.

When pressing the "next" button, songs will only be pushed when a new track plays.  Fixes a potential null pointer crash.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2014-12-24 00:25:26 -05:00
parent 33f5df030c
commit 068a844e1f
2 changed files with 8 additions and 5 deletions

View File

@@ -251,7 +251,7 @@ public class Game extends BasicGameState {
if (checkpointLoaded) {
int checkpoint = Options.getCheckpoint();
String checkpointText = String.format(
"~ Playing from checkpoint at %02d:%02d. ~",
"Playing from checkpoint at %02d:%02d.",
TimeUnit.MILLISECONDS.toMinutes(checkpoint),
TimeUnit.MILLISECONDS.toSeconds(checkpoint) -
TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(checkpoint))