diff --git a/app/src/main/java/com/github/libretube/ui/fragments/DownloadsFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/DownloadsFragment.kt index f5f889fc1..61d133fe8 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/DownloadsFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/DownloadsFragment.kt @@ -181,7 +181,7 @@ class DownloadsFragment : Fragment() { override fun onStop() { super.onStop() - if (serviceConnection.isBound) { + runCatching { context?.unbindService(serviceConnection) } }