Fix IllegalArgumentException

This commit is contained in:
Nicolas Pomepuy
2019-09-11 08:11:51 +02:00
committed by Geoffrey Métais
parent 478562826b
commit c92b6c5bd9

View File

@@ -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()