mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Fix NullPointerException in TraxManager
This commit is contained in:
parent
c38f689e39
commit
40f546e3fd
@ -23,7 +23,7 @@ public class TraxManager implements Disposable
|
|||||||
private final Room room;
|
private final Room room;
|
||||||
private final List<InteractionMusicDisc> songs = new ArrayList<>(0);
|
private final List<InteractionMusicDisc> songs = new ArrayList<>(0);
|
||||||
private int totalLength = 0;
|
private int totalLength = 0;
|
||||||
private int startedTimestamp;
|
private int startedTimestamp = 0;
|
||||||
private InteractionMusicDisc currentlyPlaying = null;
|
private InteractionMusicDisc currentlyPlaying = null;
|
||||||
private int playingIndex = 0;
|
private int playingIndex = 0;
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ public class TraxManager implements Disposable
|
|||||||
//restart
|
//restart
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Emulator.getIntUnixTimestamp() >= this.startedTimestamp + this.currentSong().getLength())
|
if (this.currentSong() != null && Emulator.getIntUnixTimestamp() >= this.startedTimestamp + this.currentSong().getLength())
|
||||||
{
|
{
|
||||||
this.play((this.playingIndex + 1) % this.songs.size());
|
this.play((this.playingIndex + 1) % this.songs.size());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user