Merge pull request #4397 from nextcloud/npeInRemove

parent file can be null
This commit is contained in:
Andy Scherzinger 2019-08-23 12:13:48 +02:00 committed by GitHub
commit ed75cffa58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -1 +1 @@
412
411

View file

@ -1892,7 +1892,8 @@ public class FileDisplayActivity extends FileActivity
setFile(getStorageManager().getFileById(removedFile.getParentId()));
cleanSecondFragment();
}
if (getStorageManager().getFileById(removedFile.getParentId()).equals(getCurrentDir())) {
OCFile parentFile = getStorageManager().getFileById(removedFile.getParentId());
if (parentFile != null && parentFile.equals(getCurrentDir())) {
refreshListOfFilesFragment(false);
}
supportInvalidateOptionsMenu();