1
1
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:
Daniel Barber 2020-01-29 21:06:03 -05:00
parent faa60733b7
commit d38cc040b6
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -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 {