prevent NPE on absolutePath

This commit is contained in:
tobiaskaminsky 2017-08-16 15:20:04 +02:00 committed by AndyScherzinger
parent 31547ccb14
commit caf9242e10
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -136,7 +136,7 @@ public class MediaProvider {
cursorImages.close();
// only do further work if folder is not within the Nextcloud app itself
if (!mediaFolder.absolutePath.startsWith(dataPath)) {
if (mediaFolder.absolutePath != null && !mediaFolder.absolutePath.startsWith(dataPath)) {
// count images
Cursor count = contentResolver.query(