From fd3436d5c0f4c1f41b04e6db805b3dfef9739a28 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 18 Feb 2016 13:40:26 -0300 Subject: [PATCH] Fix ArrayIndexOutOfBoundsException when using autoplay --- .../main/java/org/schabi/newpipe/VideoItemDetailFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/VideoItemDetailFragment.java b/app/src/main/java/org/schabi/newpipe/VideoItemDetailFragment.java index d831d8770..8eb581478 100644 --- a/app/src/main/java/org/schabi/newpipe/VideoItemDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/VideoItemDetailFragment.java @@ -301,6 +301,8 @@ public class VideoItemDetailFragment extends Fragment { initSimilarVideos(info, videoItemViewCreator); + setupActionBarHandler(info); + if(autoPlayEnabled) { playVideo(info); } @@ -321,7 +323,6 @@ public class VideoItemDetailFragment extends Fragment { } }); - setupActionBarHandler(info); } catch (java.lang.NullPointerException e) { Log.w(TAG, "updateInfo(): Fragment closed before thread ended work... or else"); e.printStackTrace();