mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-24 20:31:51 -04:00
Resolved crashes due to incorrect music state - no idea what's actually causing it, but the entire music track handling needs a revamp anyway
This commit is contained in:
parent
6b1031dae5
commit
59bd7d200b
@ -109,8 +109,9 @@ internal class MusicTrackController(private var volume: Float, initialFadeVolume
|
||||
* @throws IllegalStateException if called on uninitialized instance
|
||||
*/
|
||||
fun play(): Boolean {
|
||||
check(state.canPlay && music != null) {
|
||||
"MusicTrackController.play called on uninitialized instance"
|
||||
if (!state.canPlay || music == null) {
|
||||
clear() // reset to correct state
|
||||
return false
|
||||
}
|
||||
|
||||
// Unexplained observed exception: Gdx.Music.play fails with
|
||||
|
Loading…
x
Reference in New Issue
Block a user