Fix panic on next on empty queue
CI checks / stable / fmt (push) Successful in 3s
Details
CI checks / stable / fmt (push) Successful in 3s
Details
This commit is contained in:
parent
dfd2e0af92
commit
97ebb44ca5
|
|
@ -79,6 +79,9 @@ impl QueueManager {
|
|||
|
||||
pub fn next_track(&mut self) -> Option<Track> {
|
||||
let len = self.tracks.len();
|
||||
if len == 0 {
|
||||
return None;
|
||||
};
|
||||
if self.current_offset < len - 1 {
|
||||
self.current_offset += 1;
|
||||
let current_pos = self.current_position();
|
||||
|
|
|
|||
Loading…
Reference in New Issue