[Android] Prevent UninitializedPropertyAccessException

Nicolas Pomepuy git at videolan.org
Thu Apr 30 15:20:39 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Apr 30 10:25:34 2020 +0200| [619db826355d81ab463314a8e64ed29505121c80] | committer: Nicolas Pomepuy

Prevent UninitializedPropertyAccessException

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

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

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/view/EmptyLoadingStateView.kt b/application/vlc-android/src/org/videolan/vlc/gui/view/EmptyLoadingStateView.kt
index 1aff2572c..f83ce1917 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/view/EmptyLoadingStateView.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/view/EmptyLoadingStateView.kt
@@ -129,6 +129,7 @@ class EmptyLoadingStateView : FrameLayout {
     }
 
     private fun applyCompactMode() {
+        if (!::container.isInitialized) return
         TransitionManager.beginDelayedTransition(container)
         if (compactMode) compactConstraintSet.applyTo(container) else normalConstraintSet.applyTo(container)
         emptyTextView.gravity = if (compactMode) Gravity.START else Gravity.CENTER



More information about the Android mailing list