[Android] Prevent NPE
Geoffrey Métais
git at videolan.org
Fri May 19 15:54:02 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri May 19 12:53:55 2017 +0200| [8e316820850d1cedf969e77562d9c279e71fc8bd] | committer: Geoffrey Métais
Prevent NPE
> https://code.videolan.org/videolan/vlc-android/commit/8e316820850d1cedf969e77562d9c279e71fc8bd
---
vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
index 11a99c6..b7a76de 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
@@ -218,8 +218,9 @@ public class BaseBrowserAdapter extends BaseQueuedAdapter<ArrayList<MediaLibrary
update(new ArrayList<MediaLibraryItem>(0));
}
- public boolean isEmpty(){
- return peekLast().isEmpty();
+ public boolean isEmpty() {
+ ArrayList<MediaLibraryItem> newerList = peekLast();
+ return newerList == null || newerList.isEmpty();
}
@Override
More information about the Android
mailing list