Merge pull request #4979 from ByteHamster/fix-notificationupdater

Fixed crash when notification updater is null
This commit is contained in:
ByteHamster 2021-03-01 21:03:24 +01:00 committed by GitHub
commit ade39d18e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -640,7 +640,9 @@ public class DownloadService extends Service {
// If the service was run for a very short time, the system may delay closing
// the notification. Set the notification text now so that a misleading message
// is not left on the notification.
notificationUpdater.run();
if (notificationUpdater != null) {
notificationUpdater.run();
}
cancelNotificationUpdater();
stopForeground(true);
stopSelf();