[Android] Fix NullPointerException on video player hud backgrounds

Nicolas Pomepuy git at videolan.org
Mon Mar 21 12:28:55 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Mar 17 09:10:51 2022 +0100| [d036e207fa8709e8a33c328f3471fdd35fa6c56b] | committer: Duncan McNamara

Fix NullPointerException on video player hud backgrounds

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

 .../src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt
index bade2910b..18b4bc650 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt
@@ -109,8 +109,8 @@ class VideoPlayerOverlayDelegate (private val player: VideoPlayerActivity) {
     lateinit var playToPause: AnimatedVectorDrawableCompat
     lateinit var pauseToPlay: AnimatedVectorDrawableCompat
 
-    private val hudBackground: View by lazy { player.findViewById<View>(R.id.hud_background) }
-    private val hudRightBackground: View by lazy { player.findViewById<View>(R.id.hud_right_background) }
+    private val hudBackground: View? by lazy { player.findViewById(R.id.hud_background) }
+    private val hudRightBackground: View? by lazy { player.findViewById(R.id.hud_right_background) }
 
     private lateinit var abRepeatAddMarker: Button
 



More information about the Android mailing list