playback: fix crash with state restore [#89]

Fix an esoteric crash with queue synchronization during the playback
restore process.

Auxio will attempt to re-synchronize the queue index whenever it is
desynchronized, however during the check for if it's desynchronized,
Auxio would do a direct index of the queue, which could result in a
crash in situations where the desynchronized index is outside of the
queue bounds.

Fix this by replacing that unprotected access with a protected access,
which not only fixes the crash but also still correctly detects
desynchronization in that case.

Resolves #89.
This commit is contained in:
OxygenCobalt
2022-03-06 19:25:48 -07:00
parent 1b791074ec
commit b5b8767f46
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -9,7 +9,6 @@ While I do like adding new behavior/UI customizations, these will be looked at m
## Feature Additions and UI Changes
These arent as likely to be accepted. As I said, I do not want Auxio to become overly bloated with features that are rarely used, therefore I only tend to accept features that:
- Benefit **my own** usage
- Are in line with Auxio's purpose as a music player
@@ -25,3 +24,4 @@ Feel free to fork Auxio to add your own feature set however.
- Gapless Playback [#35] (Technical issues, may change in the future)
- Reduce leading instrument [#45] (Technical issues, Out of scope)
- Opening music through a provider [#30] (Out of scope)
- Cuesheet support [#83]