diff --git a/selector/src/main/java/com/luck/picture/lib/basic/PictureSelectionQueryModel.java b/selector/src/main/java/com/luck/picture/lib/basic/PictureSelectionQueryModel.java index 1eded0733..c83993bc4 100644 --- a/selector/src/main/java/com/luck/picture/lib/basic/PictureSelectionQueryModel.java +++ b/selector/src/main/java/com/luck/picture/lib/basic/PictureSelectionQueryModel.java @@ -253,7 +253,11 @@ public void obtainMediaData(OnQueryDataSourceListener call) { loader.loadAllAlbum(new OnQueryAllAlbumListener() { @Override public void onComplete(List result) { - if (result != null && result.size() > 0) { + if (result != null) { + if (result.size() == 0) { + call.onComplete(new ArrayList<>()); + return; + } LocalMediaFolder all = result.get(0); if (selectionConfig.isPageStrategy) { loader.loadPageMediaData(all.getBucketId(), 1, selectionConfig.pageSize,