[Android] Fix crash on onGridItemClick

Jean-Baptiste Kempf git at videolan.org
Sat Apr 5 00:49:58 CEST 2014


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Apr  2 20:13:11 2014 +0200| [d0d5ad9ef95b492461501a8ecb7b99b4f122bc2a] | committer: Jean-Baptiste Kempf

Fix crash on onGridItemClick

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

 vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java |    4 +++-
 1 file changed, 3 insertions(+), 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 4e1e2c3..9429f2e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -268,7 +268,9 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
         if (media instanceof MediaGroup) {
             MainActivity activity = (MainActivity)getActivity();
             VideoGridFragment frag = (VideoGridFragment)activity.showSecondaryFragment("videoGroupList");
-            frag.setGroup(media.getTitle());
+            if (frag != null) {
+                frag.setGroup(media.getTitle());
+            }
         }
         else
             playVideo(media, false);



More information about the Android mailing list