diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/photoviewer/PhotoViewer.java b/mastodon/src/main/java/org/joinmastodon/android/ui/photoviewer/PhotoViewer.java index 9b1efb828..721ee3dc9 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/photoviewer/PhotoViewer.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/photoviewer/PhotoViewer.java @@ -878,6 +878,8 @@ public class PhotoViewer implements ZoomPanView.Listener{ @Override public void onVideoSizeChanged(MediaPlayer mp, int width, int height){ + if(width<=0 || height<=0) + return; FrameLayout.LayoutParams params=(FrameLayout.LayoutParams) wrap.getLayoutParams(); params.width=width; params.height=height;