fix preventing a nullpointer, save a live

This commit is contained in:
yugecin 2018-07-02 00:04:06 +02:00
parent 5f2c9c5291
commit 19937e2897
No known key found for this signature in database
GPG Key ID: 2C5AC035A7068E44

View File

@ -339,13 +339,13 @@ public class MainMenu extends BaseOpsuState {
ghostLogo.drawCentered(logo.getX(), logo.getY(), color);
// now playing
if (OPTION_SHOW_UNICODE.state) {
Fonts.loadGlyphs(Fonts.MEDIUM, beatmap.titleUnicode);
Fonts.loadGlyphs(Fonts.MEDIUM, beatmap.artistUnicode);
}
final Image np = GameImage.MUSIC_NOWPLAYING.getImage();
final String trackText;
if (beatmap != null) {
if (OPTION_SHOW_UNICODE.state) {
Fonts.loadGlyphs(Fonts.MEDIUM, beatmap.titleUnicode);
Fonts.loadGlyphs(Fonts.MEDIUM, beatmap.artistUnicode);
}
trackText = beatmap.getArtist() + ": " + beatmap.getTitle();
} else {
trackText = "Loading...";