[Android] Fix UninitializedPropertyAccessException on playerBehavior

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


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue May  5 10:23:51 2020 +0200| [68b67fcfbb79533bc181633aaf419287681b0fb1] | committer: Nicolas Pomepuy

Fix UninitializedPropertyAccessException on playerBehavior

> https://code.videolan.org/videolan/vlc-android/commit/68b67fcfbb79533bc181633aaf419287681b0fb1
---

 .../src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt
index 8ce447642..61708379e 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt
@@ -425,7 +425,7 @@ open class AudioPlayerContainerActivity : BaseActivity() {
                     if (this::resumeCard.isInitialized && resumeCard.isShown) resumeCard.dismiss()
                     showAudioPlayerImpl()
                     updateContainerPadding(true)
-                    playerBehavior.let { owner.applyMarginToProgressBar(it.peekHeight) }
+                    if (::playerBehavior.isInitialized) owner.applyMarginToProgressBar(playerBehavior.peekHeight)
                 }
                 ACTION_HIDE_PLAYER -> owner.run {
                     hideAudioPlayerImpl()



More information about the Android mailing list