[Android] Fix possible crash

Jean-Baptiste Kempf git at videolan.org
Fri Jun 22 20:29:13 CEST 2012


android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Jun 22 20:29:02 2012 +0200| [164e57414aaa940d7b73ba9024148213016e9f19] | committer: Jean-Baptiste Kempf

Fix possible crash

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=164e57414aaa940d7b73ba9024148213016e9f19
---

 vlc-android/src/org/videolan/vlc/gui/MainActivity.java |    4 +++-
 1 file changed, 3 insertions(+), 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 abc0055..03b5ade 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -259,7 +259,7 @@ public class MainActivity extends SherlockFragmentActivity {
                 ft.addToBackStack(null);
                 ft.commit();
                 break;
-            // Open MRL  
+            // Open MRL
             case R.id.ml_menu_open_mrl:
                 AlertDialog.Builder b = new AlertDialog.Builder(this);
                 final EditText input = new EditText(this);
@@ -452,6 +452,8 @@ public class MainActivity extends SherlockFragmentActivity {
     }
 
     public static void sendTextInfo(Context context, String info, int progress, int max) {
+        if (context == null)
+            return;
         Intent intent = new Intent();
         intent.setAction(ACTION_SHOW_TEXTINFO);
         intent.putExtra("info", info);



More information about the Android mailing list