Fix NullPointerException when checking if storage exists

pull/6778/head
Stypox 2021-07-27 11:36:14 +02:00
rodzic 39722a5563
commit 1822d21676
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4BDF1B40A49FDD23
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -285,7 +285,7 @@ public class StoredFileHelper implements Serializable {
}
public boolean existsAsFile() {
if (source == null) {
if (source == null || (docFile == null && ioFile == null)) {
return false;
}

Wyświetl plik

@ -664,7 +664,7 @@ public class DownloadMission extends Mission {
* @return {@code true}, if storage is invalid and cannot be used
*/
public boolean hasInvalidStorage() {
return errCode == ERROR_PROGRESS_LOST || storage == null || storage.isInvalid() || !storage.existsAsFile();
return errCode == ERROR_PROGRESS_LOST || storage == null || !storage.existsAsFile();
}
/**