[Android] Prevent NPE on audio item click

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


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

Prevent NPE on audio item click

(cherry picked from commit 330bba53dba0ab1ceee3c4ce6e303c125c625b2d)

> https://code.videolan.org/videolan/vlc-android/commit/63a961cca663440ac1d6e9f95546cfa98452b835
---

 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 a3c23725e..2a354e627 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -446,6 +446,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