Skip to content

Commit 8967ddf

Browse files
committed
check if intent != null
Signed-off-by: MGasztold <[email protected]>
1 parent b7ce5e3 commit 8967ddf

File tree

1 file changed

+1
-1
lines changed
  • org.eclipse.paho.android.service/src/main/java/org/eclipse/paho/android/service

1 file changed

+1
-1
lines changed

org.eclipse.paho.android.service/src/main/java/org/eclipse/paho/android/service/MqttService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ public int onStartCommand(final Intent intent, int flags, final int startId) {
600600
// process restarted
601601
registerBroadcastReceivers();
602602

603-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
603+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && intent != null) {
604604
Notification foregroundServiceNotification
605605
= (Notification) (intent.getParcelableExtra(PAHO_MQTT_FOREGROUND_SERVICE_NOTIFICATION));
606606
if (foregroundServiceNotification != null)

0 commit comments

Comments
 (0)