From 1668b2634c6cc3d514908120a0deae5334d36139 Mon Sep 17 00:00:00 2001 From: Andy Rozman Date: Mon, 30 Dec 2019 18:43:44 +0100 Subject: [PATCH] - extension for ErrorHelperActiviity to prevent NPE --- .../plugins/general/overview/dialogs/ErrorHelperActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ErrorHelperActivity.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ErrorHelperActivity.kt index 276dfb2a6c..87f66febf0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ErrorHelperActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ErrorHelperActivity.kt @@ -16,7 +16,8 @@ class ErrorHelperActivity : NoSplashAppCompatActivity() { errorDialog.status = intent.getStringExtra("status") errorDialog.sound = intent.getIntExtra("soundid", R.raw.error) errorDialog.title = intent.getStringExtra("title") - errorDialog.clipboardContent = intent.getStringExtra("clipboardContent") + if (intent.hasExtra("clipboardContent")) + errorDialog.clipboardContent = intent.getStringExtra("clipboardContent") errorDialog.show(supportFragmentManager, "Error") if (SP.getBoolean(R.string.key_ns_create_announcements_from_errors, true)) {