[Android] PopupManager: Prevent NPE

Geoffrey Métais git at videolan.org
Thu May 24 11:02:53 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu May 24 11:00:39 2018 +0200| [57ede6584ae4aefd4d0a113c689db9dac2ec784d] | committer: Geoffrey Métais

PopupManager: Prevent NPE

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

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java b/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
index 587e81ac2..5fee691bc 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
@@ -163,6 +163,7 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
     @Override
     public void onNewVideoLayout(IVLCVout vlcVout, int width, int height,
                                  int visibleWidth, int visibleHeight, int sarNum, int sarDen) {
+        if (mRootView == null) return;
         int displayW = mRootView.getWidth(), displayH = mRootView.getHeight();
 
         // sanity check



More information about the Android mailing list