[Android] Fix NullPointerException

Nicolas Pomepuy git at videolan.org
Thu Jun 4 11:30:20 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Jun  3 06:51:20 2020 +0200| [78f715ca6439865379605cce39e45090b85ee2e3] | committer: Nicolas Pomepuy

Fix NullPointerException

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

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

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
index 8e4b7e408..b9a8f42bf 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
@@ -2605,7 +2605,7 @@ open class VideoPlayerActivity : AppCompatActivity(), PlaybackService.Callback,
                     }
                 }
                 val interactive = service?.mediaplayer?.let {
-                    it.titles[it.title].isInteractive
+                    (it.titles[it.title])?.isInteractive ?: false
                 } ?: false
                 isNavMenu = menuIdx == currentIdx || interactive
             }



More information about the Android mailing list