[Android] Fix possible NPE on rotation
Alexandre Perraud
git at videolan.org
Thu Apr 30 10:45:22 CEST 2015
vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Thu Apr 30 10:39:47 2015 +0200| [b1ba95c7e6b5a5ff75c7da2b09da58bceab41824] | committer: Alexandre Perraud
Fix possible NPE on rotation
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=b1ba95c7e6b5a5ff75c7da2b09da58bceab41824
---
vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 5f40b37..36624ff 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -710,8 +710,8 @@ public class MainActivity extends AppCompatActivity implements OnItemClickListen
v.setNextFocusRightId(R.id.ml_menu_search);
if (LibVlcUtil.isHoneycombOrLater())
v.setNextFocusForwardId(mActionBarIconId);
- findViewById(R.id.ml_menu_search).setNextFocusLeftId(
- mActionBarIconId);
+ if (findViewById(R.id.ml_menu_search) != null)
+ findViewById(R.id.ml_menu_search).setNextFocusLeftId(mActionBarIconId);
}
return super.onKeyUp(keyCode, event);
}
More information about the Android
mailing list