[Android] fix possible crash
Sébastien Toque
git at videolan.org
Fri Jun 22 17:56:21 CEST 2012
android | branch: master | Sébastien Toque <xilasz at gmail.com> | Fri Jun 22 17:55:38 2012 +0200| [e43cfac346fd4cd59a6a672edcc8b9610e686592] | committer: Sébastien Toque
fix possible crash
> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=e43cfac346fd4cd59a6a672edcc8b9610e686592
---
vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 40b4de2..abc0055 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -431,12 +431,16 @@ public class MainActivity extends SherlockFragmentActivity {
};
public static void showProgressBar(Context context) {
+ if (context == null)
+ return;
Intent intent = new Intent();
intent.setAction(ACTION_SHOW_PROGRESSBAR);
context.getApplicationContext().sendBroadcast(intent);
}
public static void hideProgressBar(Context context) {
+ if (context == null)
+ return;
Intent intent = new Intent();
intent.setAction(ACTION_HIDE_PROGRESSBAR);
context.getApplicationContext().sendBroadcast(intent);
More information about the Android
mailing list