From ceeaf458d979c06d189992105b8361cde73f46f7 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 6 Apr 2022 14:32:31 +0200 Subject: [PATCH] prevent NPE --- .../androidaps/plugins/general/overview/OverviewFragment.kt | 1 + .../java/info/nightscout/androidaps/skins/SkinLargeDisplay.kt | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt index 508caefd0d..2d563edf6e 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt @@ -308,6 +308,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList fun refreshAll() { runOnUiThread { + _binding ?: return@runOnUiThread updateBg() updateTime() updateProfile() diff --git a/app/src/main/java/info/nightscout/androidaps/skins/SkinLargeDisplay.kt b/app/src/main/java/info/nightscout/androidaps/skins/SkinLargeDisplay.kt index 73b49bf9bb..eb64d5514b 100644 --- a/app/src/main/java/info/nightscout/androidaps/skins/SkinLargeDisplay.kt +++ b/app/src/main/java/info/nightscout/androidaps/skins/SkinLargeDisplay.kt @@ -1,11 +1,9 @@ package info.nightscout.androidaps.skins import android.util.DisplayMetrics -import android.view.View -import android.widget.LinearLayout -import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.R import info.nightscout.androidaps.databinding.OverviewFragmentBinding +import info.nightscout.androidaps.interfaces.Config import javax.inject.Inject import javax.inject.Singleton