From c19292f62df067bdf8fe95a363d70b1796d67d41 Mon Sep 17 00:00:00 2001 From: Nicolas Pomepuy Date: Thu, 17 Oct 2024 11:57:50 +0200 Subject: [PATCH] Prevent an IllegalStateException crash in the remote access onboarding --- .../onboarding/RemoteAccessOnboardingContentFragment.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/application/webserver/src/main/java/org/videolan/vlc/webserver/gui/remoteaccess/onboarding/RemoteAccessOnboardingContentFragment.kt b/application/webserver/src/main/java/org/videolan/vlc/webserver/gui/remoteaccess/onboarding/RemoteAccessOnboardingContentFragment.kt index be87f0ede..78b459489 100644 --- a/application/webserver/src/main/java/org/videolan/vlc/webserver/gui/remoteaccess/onboarding/RemoteAccessOnboardingContentFragment.kt +++ b/application/webserver/src/main/java/org/videolan/vlc/webserver/gui/remoteaccess/onboarding/RemoteAccessOnboardingContentFragment.kt @@ -64,9 +64,12 @@ class RemoteAccessOnboardingContentFragment : RemoteAccessOnboardingFragment() { animationLoop.playSequentially(appearingSets.toMutableList() as List?) animationLoop.doOnEnd { lifecycleScope.launch { - viewLifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) { - delay(2000) - animationLoop.start() + try { + viewLifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) { + delay(2000) + animationLoop.start() + } + } catch (_: IllegalStateException) { } } }