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
@@ -1,7 +1,6 @@
# Changelog
## dev [v2.2.2 or 2.3.0]
#### What's New
- New spanish translations and metadata [courtesy of n-berenice]
@@ -16,6 +15,7 @@ from the system theme was used [#80]
- Fixed incorrect track numbers when the tag was formatted as NN/TT [#88]
- Fixed years deliberately set as "0" showing up as "No Date"
- Fixed headset management unexpectedly starting audio when the app initially opens
- Fixed crash that would occur during a playback restore with specific queue states [#89]
#### What's Changed
- All cover art is now cropped to a 1:1 aspect ratio