[Android] Add view nullity check on delete fail
Geoffrey Métais
git at videolan.org
Tue Jan 16 15:02:49 CET 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jan 16 15:00:53 2018 +0100| [5570dc22a3022bb59f0bf6cf3b3a4313730b3f1a] | committer: Geoffrey Métais
Add view nullity check on delete fail
> https://code.videolan.org/videolan/vlc-android/commit/5570dc22a3022bb59f0bf6cf3b3a4313730b3f1a
---
vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.java
index 35224bb0a..748c91675 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.java
@@ -208,7 +208,8 @@ public abstract class MediaBrowserFragment extends PlaybackServiceFragment imple
}
private void onDeleteFailed(MediaWrapper media) {
- if (isAdded()) UiTools.snacker(getView(), getString(R.string.msg_delete_failed, media.getTitle()));
+ final View v = getView();
+ if (v != null && isAdded()) UiTools.snacker(v, getString(R.string.msg_delete_failed, media.getTitle()));
}
protected void showInfoDialog(MediaLibraryItem item) {
More information about the Android
mailing list