[Android] Fix crash in onSearchRequested

Jean-Baptiste Kempf git at videolan.org
Sun Apr 6 18:00:39 CEST 2014


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Apr  6 17:59:27 2014 +0200| [023d8472a8c73ca31f9b43379299a06abcb4db87] | committer: Jean-Baptiste Kempf

Fix crash in onSearchRequested

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

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 28a2459..0584450 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -581,7 +581,7 @@ public class MainActivity extends SherlockFragmentActivity {
 
     @Override
     public boolean onSearchRequested() {
-        if (mCurrentFragment.equals("search"))
+        if (mCurrentFragment != null && mCurrentFragment.equals("search"))
             ((SearchFragment)fetchSecondaryFragment("search")).onSearchKeyPressed();
         showSecondaryFragment("search");
         return true;



More information about the Android mailing list