kopia lustrzana https://github.com/TeamNewPipe/NewPipe
Merge pull request #8661 from Stypox/player-refactor-npe
Fix random NullPointerException when adding video player viewpull/8721/head^2
commit
3420faab08
|
@ -1312,9 +1312,11 @@ public final class VideoDetailFragment
|
|||
// Prevent from re-adding a view multiple times
|
||||
new Handler(Looper.getMainLooper()).post(() ->
|
||||
player.UIs().get(MainPlayerUi.class).ifPresent(playerUi -> {
|
||||
playerUi.removeViewFromParent();
|
||||
binding.playerPlaceholder.addView(playerUi.getBinding().getRoot());
|
||||
playerUi.setupVideoSurfaceIfNeeded();
|
||||
if (binding != null) {
|
||||
playerUi.removeViewFromParent();
|
||||
binding.playerPlaceholder.addView(playerUi.getBinding().getRoot());
|
||||
playerUi.setupVideoSurfaceIfNeeded();
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue