[Android] src: Check for null in AudioListFragment.onContextMenuItemSelected()
Edward Wang
git at videolan.org
Sat Aug 4 04:04:20 CEST 2012
android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Fri Aug 3 22:04:08 2012 -0400| [6c1401b8ef1d02b9816bae877a9f4a1e158cdb79] | committer: Edward Wang
src: Check for null in AudioListFragment.onContextMenuItemSelected()
> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=6c1401b8ef1d02b9816bae877a9f4a1e158cdb79
---
vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java
index 0a77d85..292c458 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java
@@ -162,6 +162,9 @@ public class AudioListFragment extends SherlockListFragment {
@Override
public boolean onContextItemSelected(MenuItem item) {
AdapterContextMenuInfo menuInfo = (AdapterContextMenuInfo) item.getMenuInfo();
+ if(menuInfo == null) // getMenuInfo can be NULL
+ return super.onContextItemSelected(item);
+
int startPosition;
List<String> medias;
int id = item.getItemId();
More information about the Android
mailing list