[Android] Add nullity check for Snackbar
Geoffrey Métais
git at videolan.org
Tue Jan 16 17:45:48 CET 2018
vlc-android | branch: chromecast | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan 15 09:43:41 2018 +0100| [cad08823f8dd3e13b690dc15dfb7babcdcea281d] | committer: Geoffrey Métais
Add nullity check for Snackbar
> https://code.videolan.org/videolan/vlc-android/commit/cad08823f8dd3e13b690dc15dfb7babcdcea281d
---
vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
index d4061d3c0..d6e1c4b4a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
@@ -558,7 +558,8 @@ public abstract class BaseBrowserFragment extends SortableFragment<BaseBrowserAd
mAdapter.addItem(mw, true);
}
};
- UiTools.snackerWithCancel(getView(), getString(R.string.file_deleted), new Runnable() {
+ final View v = getView();
+ if (v != null) UiTools.snackerWithCancel(v, getString(R.string.file_deleted), new Runnable() {
@Override
public void run() {
deleteMedia(mw, false, cancel);
More information about the Android
mailing list