[Android] VideoHelper: add nullity check
Geoffrey Métais
git at videolan.org
Tue Feb 5 15:31:12 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Feb 5 15:29:49 2019 +0100| [70c5bdc090ad0b41e115bd64cc6b481ac712d782] | committer: Geoffrey Métais
VideoHelper: add nullity check
> https://code.videolan.org/videolan/vlc-android/commit/70c5bdc090ad0b41e115bd64cc6b481ac712d782
---
libvlc/src/org/videolan/libvlc/VideoHelper.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvlc/src/org/videolan/libvlc/VideoHelper.java b/libvlc/src/org/videolan/libvlc/VideoHelper.java
index c5ed5ee11..b03dc3ece 100644
--- a/libvlc/src/org/videolan/libvlc/VideoHelper.java
+++ b/libvlc/src/org/videolan/libvlc/VideoHelper.java
@@ -193,7 +193,7 @@ class VideoHelper implements IVLCVout.OnNewVideoLayoutListener {
if (activity != null) {
sw = activity.getWindow().getDecorView().getWidth();
sh = activity.getWindow().getDecorView().getHeight();
- } else if (mDisplayManager.getPresentation() != null && mDisplayManager.getPresentation().getWindow() != null) {
+ } else if (mDisplayManager != null && mDisplayManager.getPresentation() != null && mDisplayManager.getPresentation().getWindow() != null) {
sw = mDisplayManager.getPresentation().getWindow().getDecorView().getWidth();
sh = mDisplayManager.getPresentation().getWindow().getDecorView().getHeight();
} else return;
More information about the Android
mailing list