Resolved crash when resuming before music controller initialized

This commit is contained in:
Yair Morgenstern
2022-07-07 19:57:34 +03:00
parent ce5f0dd879
commit e8eb66a4f6

View File

@ -346,8 +346,8 @@ class UncivGame(parameters: UncivGameParameters) : Game() {
// This is ALWAYS called after create() on Android - google "Android life cycle"
override fun resume() {
super.resume()
musicController.resume()
if (!isInitialized) return // The stuff from Create() is still happening, so the main screen will load eventually
musicController.resume()
// This is also needed in resume to open links and notifications
// correctly when the app was already running. The handling in onCreate