[Android] Fix lateinit unitialized variable crash

Nicolas Pomepuy git at videolan.org
Mon Jan 20 09:41:55 CET 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Jan 20 09:13:46 2020 +0100| [fb639d902493dcb191b034a752cd5b62e123ff20] | committer: Geoffrey Métais

Fix lateinit unitialized variable crash

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

 vlc-android/src/org/videolan/vlc/gui/video/VideoStatsDelegate.kt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoStatsDelegate.kt b/vlc-android/src/org/videolan/vlc/gui/video/VideoStatsDelegate.kt
index d6292a758..6fb21ecbf 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoStatsDelegate.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoStatsDelegate.kt
@@ -177,6 +177,7 @@ class VideoStatsDelegate(private val player: VideoPlayerActivity, val scrolling:
     }
 
     private fun setupLayout() {
+        if (!::constraintSetLarge.isInitialized) return
         if (player.getScreenWidth() > 600.dp) {
             constraintSetLarge.applyTo(binding.statsScrollviewContent)
         } else {



More information about the Android mailing list