[Android] Prevent NPE
Geoffrey Métais
git at videolan.org
Fri Mar 13 16:21:14 CET 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Mar 13 11:01:52 2015 +0100| [0c8ad83e2e98280ae7e48b7399e61568b4913cb8] | committer: Geoffrey Métais
Prevent NPE
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=0c8ad83e2e98280ae7e48b7399e61568b4913cb8
---
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 1c35c08..434a23b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -405,6 +405,8 @@ public class VideoGridFragment extends BrowserFragment implements ISortable, IVi
private void focusHelper(boolean idIsEmpty) {
View parent = getView();
MainActivity main = (MainActivity)getActivity();
+ if (main == null)
+ return;
main.setMenuFocusDown(idIsEmpty, android.R.id.list);
main.setSearchAsFocusDown(idIsEmpty, parent,
android.R.id.list);
More information about the Android
mailing list