From 96f0817c206a8d6f2a08710615572a74867cf5db Mon Sep 17 00:00:00 2001 From: Grishka Date: Sun, 17 Sep 2023 10:26:27 +0300 Subject: [PATCH] Fix #690 --- .../org/joinmastodon/android/ui/photoviewer/PhotoViewer.java | 2 ++ 1 file changed, 2 insertions(+) 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;