From 3cb18b7d4edbcad32ca1b8c6f5e7104184dc84dc Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 8 Feb 2021 16:17:24 +0100 Subject: [PATCH] fix NPE --- .../overview/notifications/DismissNotificationService.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/DismissNotificationService.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/DismissNotificationService.kt index 3d4e2d0600..da3fe07f6f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/DismissNotificationService.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/DismissNotificationService.kt @@ -9,7 +9,9 @@ import javax.inject.Inject class DismissNotificationService : DaggerIntentService(DismissNotificationService::class.simpleName) { @Inject lateinit var rxBus: RxBusWrapper - override fun onHandleIntent(intent: Intent) { - rxBus.send(EventDismissNotification(intent.getIntExtra("alertID", -1))) + override fun onHandleIntent(intent: Intent?) { + intent?.let { + rxBus.send(EventDismissNotification(intent.getIntExtra("alertID", -1))) + } } } \ No newline at end of file