intent may be null on service restart

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2018-07-05 08:07:25 +02:00
parent 9d6592ea87
commit f78a187515
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -178,7 +178,7 @@ public class FileDownloader extends Service
startForeground(FOREGROUND_SERVICE_ID, mNotification);
if (!intent.hasExtra(EXTRA_ACCOUNT) || !intent.hasExtra(EXTRA_FILE)) {
if (intent == null || !intent.hasExtra(EXTRA_ACCOUNT) || !intent.hasExtra(EXTRA_FILE)) {
Log_OC.e(TAG, "Not enough information provided in intent");
return START_NOT_STICKY;
} else {