[Android] PopupManager: Prevent NPE
Geoffrey Métais
git at videolan.org
Thu May 24 11:03:27 CEST 2018
vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu May 24 11:00:39 2018 +0200| [44affd66c89e5eb2ec14b94e6030db2e817babf8] | committer: Geoffrey Métais
PopupManager: Prevent NPE
(cherry picked from commit 57ede6584ae4aefd4d0a113c689db9dac2ec784d)
> https://code.videolan.org/videolan/vlc-android/commit/44affd66c89e5eb2ec14b94e6030db2e817babf8
---
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 9d729f9fa..3868c9565 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