npe in file owner after upgrade (#4191)

npe in file owner after upgrade
This commit is contained in:
Tobias Kaminsky 2019-07-01 16:16:52 +02:00 committed by GitHub
commit 49d038d858
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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<RecyclerView.ViewHol
ArrayList<String> sharees = (ArrayList<String>) 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);
}