prevent possible(?) nullpointer by auto unboxing
This commit is contained in:
parent
d412a2e39e
commit
4338513180
|
@ -295,7 +295,7 @@ public class MainMenu extends BaseOpsuState {
|
||||||
Float beatPosition = MusicController.getBeatProgress();
|
Float beatPosition = MusicController.getBeatProgress();
|
||||||
Float beatLength = MusicController.getBeatLength();
|
Float beatLength = MusicController.getBeatLength();
|
||||||
final boolean renderPiece = beatPosition != null;
|
final boolean renderPiece = beatPosition != null;
|
||||||
if (beatPosition == null) {
|
if (beatPosition == null || beatLength == null) {
|
||||||
beatPosition = System.currentTimeMillis() % 1000 / 1000f;
|
beatPosition = System.currentTimeMillis() % 1000 / 1000f;
|
||||||
beatLength = 1000f;
|
beatLength = 1000f;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user