From b5e69db76a99a91117f538bc82acf7797a5bd36b Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 1 Jul 2019 12:19:47 +0200 Subject: [PATCH] npe in file owner after upgrade Signed-off-by: tobiasKaminsky --- .../com/owncloud/android/ui/adapter/OCFileListAdapter.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java b/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java index a3b58a6513..e9ccc12d04 100644 --- a/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java +++ b/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java @@ -49,7 +49,6 @@ import com.bumptech.glide.request.target.BitmapImageViewTarget; import com.nextcloud.client.account.UserAccountManager; import com.nextcloud.client.preferences.AppPreferences; import com.owncloud.android.R; -import com.owncloud.android.authentication.AccountUtils; import com.owncloud.android.datamodel.FileDataStorageManager; import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.datamodel.ThumbnailsCacheManager; @@ -366,7 +365,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter sharees = (ArrayList) file.getSharees(); // use fileOwner if not oneself, then add at first - if (!fileOwner.equals(userId) && !sharees.contains(fileOwner)) { + if (fileOwner != null && !fileOwner.equals(userId) && !sharees.contains(fileOwner)) { sharees.add(fileOwner); }