[Android] src: Check that getExtras() is not null to prevent crash

Edward Wang git at videolan.org
Tue Jul 3 02:35:40 CEST 2012


android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Mon Jul  2 20:35:31 2012 -0400| [cbd4bb53824c7d3bc605bfd1272286567bc4dcce] | committer: Edward Wang

src: Check that getExtras() is not null to prevent crash

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

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 3612444..4fec8d2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -837,7 +837,7 @@ public class VideoPlayerActivity extends Activity {
                 && getIntent().getAction().equals(Intent.ACTION_VIEW)) {
             /* Started from external application */
             location = getIntent().getDataString();
-        } else {
+        } else if(getIntent().getExtras() != null) {
             /* Started from VideoListActivity */
             location = getIntent().getExtras().getString("itemLocation");
         }



More information about the Android mailing list