kopia lustrzana https://github.com/TeamNewPipe/NewPipe
Fix random NullPointerException when adding video player view
rodzic
ae369ec9ba
commit
4eddd2c3d1
|
@ -1313,9 +1313,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