Commit 70c5bdc0 authored by Geoffrey Métais's avatar Geoffrey Métais

VideoHelper: add nullity check

parent b920b1a0
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment