[Android] Prevent NPE in audio fragment

Geoffrey Métais git at videolan.org
Tue Sep 19 14:19:28 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Sep 19 14:18:55 2017 +0200| [452eaf4906fe8311a385cfeb57a1862f937566fd] | committer: Geoffrey Métais

Prevent NPE in audio fragment

> https://code.videolan.org/videolan/vlc-android/commit/452eaf4906fe8311a385cfeb57a1862f937566fd
---

 vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
index d25007293..df0d75481 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -402,6 +402,8 @@ public class AudioBrowserFragment extends BaseAudioBrowser implements SwipeRefre
     }
 
     public void restoreList() {
+        if (mViewPager == null)
+            return;
         getCurrentAdapter().restoreList();
     }
 



More information about the Android mailing list