mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
Fix occasional launch crash bug
This commit is contained in:
parent
faa60733b7
commit
d38cc040b6
@ -33,7 +33,7 @@ func queueReducer(action: Action, state: QueueState?) -> QueueState {
|
||||
let newSongRowPos = action.queuePos
|
||||
state.queuePos = action.queuePos
|
||||
|
||||
if oldSongRowPos >= 0 {
|
||||
if oldSongRowPos >= 0 && state.queue.count > 0 {
|
||||
state.queue[oldSongRowPos].isPlaying = false
|
||||
}
|
||||
if newSongRowPos >= 0 && state.queue.count > newSongRowPos {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user