We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae369ec commit 4eddd2cCopy full SHA for 4eddd2c
1 file changed
app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java
@@ -1313,9 +1313,11 @@ private void addVideoPlayerView() {
1313
// Prevent from re-adding a view multiple times
1314
new Handler(Looper.getMainLooper()).post(() ->
1315
player.UIs().get(MainPlayerUi.class).ifPresent(playerUi -> {
1316
- playerUi.removeViewFromParent();
1317
- binding.playerPlaceholder.addView(playerUi.getBinding().getRoot());
1318
- playerUi.setupVideoSurfaceIfNeeded();
+ if (binding != null) {
+ playerUi.removeViewFromParent();
+ binding.playerPlaceholder.addView(playerUi.getBinding().getRoot());
1319
+ playerUi.setupVideoSurfaceIfNeeded();
1320
+ }
1321
}));
1322
}
1323
0 commit comments