From 0e8cc72b134bf5755f59cbbfd6e01180509e7c57 Mon Sep 17 00:00:00 2001 From: Stypox Date: Thu, 14 Jul 2022 22:14:03 +0200 Subject: [PATCH] Fix random NullPointerException when adding video player view --- .../schabi/newpipe/fragments/detail/VideoDetailFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 92e7e4f16..0b32a5e29 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -1305,7 +1305,7 @@ public final class VideoDetailFragment } private void addVideoPlayerView() { - if (!isPlayerAvailable()) { + if (!isPlayerAvailable() || getView() == null) { return; } setHeightThumbnail();