prevent NPE

This commit is contained in:
Milos Kozak 2020-07-24 10:18:19 +02:00
parent fc69e851d1
commit 6b676a1dfd

View file

@ -261,7 +261,7 @@ class WizardDialog : DaggerDialogFragment() {
private fun calculateInsulin() {
val profileStore = activePlugin.activeProfileInterface.profile
if (treatments_wizard_profile.selectedItem == null || profileStore == null)
if (treatments_wizard_profile?.selectedItem == null || profileStore == null)
return // not initialized yet
var profileName = treatments_wizard_profile.selectedItem.toString()
val specificProfile: Profile?