[Android] Fix weird NPE
Geoffrey Métais
git at videolan.org
Wed Dec 16 18:55:19 CET 2015
vlc-android | branch: 1.7.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Dec 16 18:54:43 2015 +0100| [c3103b4dca0dfdb1f8ce5eb92b28a491af125027] | committer: Geoffrey Métais
Fix weird NPE
> https://code.videolan.org/videolan/vlc-android/commit/c3103b4dca0dfdb1f8ce5eb92b28a491af125027
---
vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index 89a2f03..e6ca0d6 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -307,6 +307,8 @@ public class VideoGridFragment extends MediaBrowserFragment implements ISortable
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
+ if (menuInfo == null)
+ return;
// Do not show the menu of media group.
ContextMenuRecyclerView.RecyclerContextMenuInfo info = (ContextMenuRecyclerView.RecyclerContextMenuInfo)menuInfo;
MediaWrapper media = mVideoAdapter.getItem(info.position);
More information about the Android
mailing list