[Android] Prevent NPE on audio item click

Geoffrey Métais git at videolan.org
Tue Jan 9 15:36:56 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jan  9 09:55:22 2018 +0100| [330bba53dba0ab1ceee3c4ce6e303c125c625b2d] | committer: Geoffrey Métais

Prevent NPE on audio item click

> https://code.videolan.org/videolan/vlc-android/commit/330bba53dba0ab1ceee3c4ce6e303c125c625b2d
---

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

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 2403ce870..7bbc95bb4 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -447,6 +447,7 @@ public class AudioBrowserFragment extends BaseAudioBrowser implements SwipeRefre
 
     @Override
     public void onClick(View v, int position, MediaLibraryItem item) {
+        if (item == null) return;
         if (mActionMode != null) {
             super.onClick(v, position, item);
             return;



More information about the Android mailing list