[Android] Check context validity while browsing
Geoffrey Métais
git at videolan.org
Wed Jun 22 18:07:06 CEST 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Jun 22 18:04:10 2016 +0200| [c603741919fe0048cc0c165374df079653c7c413] | committer: Geoffrey Métais
Check context validity while browsing
> https://code.videolan.org/videolan/vlc-android/commit/c603741919fe0048cc0c165374df079653c7c413
---
vlc-android/src/org/videolan/vlc/gui/browser/FileBrowserFragment.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/FileBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/FileBrowserFragment.java
index 00fe81f..d0baf9f 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/FileBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/FileBrowserFragment.java
@@ -110,10 +110,10 @@ public class FileBrowserFragment extends BaseBrowserFragment {
directory = new MediaWrapper(AndroidUtil.PathToUri(mediaDirLocation));
directory.setType(MediaWrapper.TYPE_DIR);
if (TextUtils.equals(AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY, mediaDirLocation))
- directory.setDisplayTitle(getString(R.string.internal_memory));
+ directory.setDisplayTitle(VLCApplication.getAppResources().getString(R.string.internal_memory));
mAdapter.addItem(directory, false, false);
}
- if (mReadyToDisplay) {
+ if (mReadyToDisplay && context != null) {
context.runOnUiThread(new Runnable() {
@Override
public void run() {
More information about the Android
mailing list