Correct null pointer

This commit is contained in:
Sebastien 2018-03-05 14:55:05 +01:00
parent 75113f051a
commit 270f52321b

View File

@ -153,6 +153,7 @@ public class TrackScheduler extends AudioEventAdapter {
// Start the next track, regardless of if something is already playing or not. In case queue was empty, we are
// giving null to startTrack, which is a valid argument and will simply stop the player.
UserAudioTrack track = queue.poll();
if(track != null)
this.currentPlayingTrack = track;
if(track != null)
player.startTrack(track.getAudioTrack(), false);