diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailSharingFragment.java b/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailSharingFragment.java index 5044fceda047..600338bbf7d2 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailSharingFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailSharingFragment.java @@ -452,7 +452,11 @@ public void refreshCapabilitiesFromDB() { * before reading database. */ public void refreshSharesFromDB() { - file = fileDataStorageManager.getFileById(file.getFileId()); + OCFile newFile = fileDataStorageManager.getFileById(file.getFileId()); + if (newFile != null) { + file = newFile; + } + ShareeListAdapter adapter = (ShareeListAdapter) binding.sharesList.getAdapter(); if (adapter == null) {