Skip to content

Commit

Permalink
check if intent != null
Browse files Browse the repository at this point in the history
  • Loading branch information
MGasztold committed Jul 16, 2020
1 parent b7ce5e3 commit 9e23d1d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ public int onStartCommand(final Intent intent, int flags, final int startId) {
// process restarted
registerBroadcastReceivers();

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && intent != null) {
Notification foregroundServiceNotification
= (Notification) (intent.getParcelableExtra(PAHO_MQTT_FOREGROUND_SERVICE_NOTIFICATION));
if (foregroundServiceNotification != null)
Expand Down

0 comments on commit 9e23d1d

Please sign in to comment.