1
0
mirror of https://github.com/fabianonline/telegram_backup.git synced 2024-11-26 02:06:30 +00:00

Reorder clause to prevent null pointer exception when response is null and try_again is true

This commit is contained in:
Leijurv 2018-02-14 10:47:43 -08:00 committed by GitHub
parent a34ba8a84c
commit 3ee90ac6c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -450,7 +450,7 @@ class DownloadManager(internal var client: TelegramClient?, p: DownloadProgressI
} catch (e: InterruptedException) {
}
} while (offset < size && (response!!.getBytes().getData().size > 0 || try_again))
} while (offset < size && (try_again || response!!.getBytes().getData().size > 0))
fos.close()
if (offset < size) {
System.out.println("Requested file $target with $size bytes, but got only $offset bytes.")