[Android] Fix IllegalArgumentException

Nicolas Pomepuy git at videolan.org
Wed Oct 16 17:43:52 CEST 2019


vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Mon Oct 14 09:34:23 2019 +0200| [53e0e04b40d54fb19ad107aa7a0126fa43438287] | committer: Geoffrey Métais

Fix IllegalArgumentException

> https://code.videolan.org/videolan/vlc-android/commit/53e0e04b40d54fb19ad107aa7a0126fa43438287
---

 vlc-android/src/org/videolan/vlc/media/MediaUtils.kt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt b/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt
index ea812a0a3..dc72a8491 100644
--- a/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt
+++ b/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt
@@ -449,7 +449,10 @@ object MediaUtils : CoroutineScope {
         }
 
         private fun dismiss() {
-            if (this::dialog.isInitialized && dialog.isShowing) dialog.dismiss()
+            try {
+                if (this::dialog.isInitialized && dialog.isShowing) dialog.dismiss()
+            } catch (ignored: IllegalArgumentException) {
+            }
         }
     }
 



More information about the Android mailing list