[Android] Fix IllegalArgumentException
Nicolas Pomepuy
git at videolan.org
Mon Sep 23 18:10:22 CEST 2019
vlc-android | branch: 3.2.x | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Wed Sep 11 08:11:51 2019 +0200| [d8769c7809c655aad478ffe4a75ec77e078e9254] | committer: Geoffrey Métais
Fix IllegalArgumentException
(cherry picked from commit c92b6c5bd9f9c3278eee162f6857bc99a61dca02)
> https://code.videolan.org/videolan/vlc-android/commit/d8769c7809c655aad478ffe4a75ec77e078e9254
---
vlc-android/src/org/videolan/vlc/ExternalMonitor.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/ExternalMonitor.kt b/vlc-android/src/org/videolan/vlc/ExternalMonitor.kt
index 58a672cb9..2019e2004 100644
--- a/vlc-android/src/org/videolan/vlc/ExternalMonitor.kt
+++ b/vlc-android/src/org/videolan/vlc/ExternalMonitor.kt
@@ -190,7 +190,7 @@ object ExternalMonitor : BroadcastReceiver(), LifecycleObserver, CoroutineScope
@OnLifecycleEvent(Lifecycle.Event.ON_STOP)
internal fun unregister() {
val ctx = VLCApplication.appContext
- ctx.unregisterReceiver(this)
+ if (registered) ctx.unregisterReceiver(this)
registered = false
connected.value = false
devices.clear()
More information about the Android
mailing list