[Android] Fix UninitializedPropertyAccessException

Nicolas Pomepuy git at videolan.org
Thu May 7 12:17:02 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon May  4 14:17:56 2020 +0200| [58c988715affc4a1b15df916f105ed81495ce69b] | committer: Nicolas Pomepuy

Fix UninitializedPropertyAccessException

> https://code.videolan.org/videolan/vlc-android/commit/58c988715affc4a1b15df916f105ed81495ce69b
---

 application/vlc-android/src/org/videolan/vlc/PlaybackService.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt b/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
index e1d9505a6..a6787741e 100644
--- a/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
+++ b/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
@@ -759,7 +759,7 @@ class PlaybackService : MediaBrowserServiceCompat(), LifecycleOwner {
 
     private fun hideNotification(remove: Boolean): Boolean {
         notificationShowing = false
-        return cbActor.safeOffer(HideNotification(remove))
+        return if (::cbActor.isInitialized) cbActor.safeOffer(HideNotification(remove)) else false
     }
 
     private fun hideNotificationInternal(remove: Boolean) {



More information about the Android mailing list