[Android] Fix crash on network discovery for TV variant
Geoffrey Métais
git at videolan.org
Mon Jun 1 17:48:58 CEST 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jun 1 17:48:10 2015 +0200| [c5978097845f253444529e2aa8ef88731fefdd89] | committer: Geoffrey Métais
Fix crash on network discovery for TV variant
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=c5978097845f253444529e2aa8ef88731fefdd89
---
.../src/org/videolan/vlc/gui/tv/browser/BrowserGridFragment.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/BrowserGridFragment.java b/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/BrowserGridFragment.java
index 04319cf..b890c88 100644
--- a/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/BrowserGridFragment.java
+++ b/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/BrowserGridFragment.java
@@ -56,7 +56,9 @@ public class BrowserGridFragment extends GridFragment implements MediaBrowser.Ev
if (savedInstanceState != null){
mUri = Uri.parse(savedInstanceState.getString(BaseBrowserFragment.KEY_MRL));
} else {
- mUri = Uri.parse(getActivity().getIntent().getStringExtra(BaseBrowserFragment.KEY_MRL));
+ Intent intent = getActivity().getIntent();
+ if (intent != null && intent.hasExtra(BaseBrowserFragment.KEY_MRL))
+ mUri = Uri.parse(intent.getStringExtra(BaseBrowserFragment.KEY_MRL));
}
setOnItemViewSelectedListener(this);
}
More information about the Android
mailing list