[Android] VideoGridFragment: fix a potential NULL dereference

Jean-Baptiste Kempf git at videolan.org
Sat Dec 1 10:09:10 CET 2012


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Dec  1 10:04:01 2012 +0100| [04de4e9d1fb60b7bc5d618d1087c0cea958388fa] | committer: Jean-Baptiste Kempf

VideoGridFragment: fix a potential NULL dereference

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=04de4e9d1fb60b7bc5d618d1087c0cea958388fa
---

 vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 7f98f0a..e0a2f89 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -288,7 +288,7 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
     @Override
     public boolean onContextItemSelected(MenuItem menu) {
         AdapterContextMenuInfo info = (AdapterContextMenuInfo) menu.getMenuInfo();
-        if (handleContextItemSelected(menu, info.position))
+        if (info != null && handleContextItemSelected(menu, info.position))
             return true;
         return super.onContextItemSelected(menu);
     }



More information about the Android mailing list