diff --git a/imagepicker/src/main/java/com/lzy/imagepicker/ImageDataSource.java b/imagepicker/src/main/java/com/lzy/imagepicker/ImageDataSource.java index a66e239..e5b75b9 100644 --- a/imagepicker/src/main/java/com/lzy/imagepicker/ImageDataSource.java +++ b/imagepicker/src/main/java/com/lzy/imagepicker/ImageDataSource.java @@ -122,7 +122,7 @@ public void onLoadFinished(Loader loader, Cursor data) { } } //防止没有图片报异常 - if (data.getCount() > 0) { + if (data.getCount() > 0 && allImages.size()>0) { //构造所有图片的集合 ImageFolder allImagesFolder = new ImageFolder(); allImagesFolder.name = activity.getResources().getString(R.string.ip_all_images);