prevent NPE
This commit is contained in:
parent
0f92e5409d
commit
0774aa46d0
1 changed files with 8 additions and 7 deletions
|
@ -179,7 +179,7 @@ class CarbsDialog : DialogFragmentWithDate() {
|
|||
setOnValueChangedListener { eventTime: Long ->
|
||||
run {
|
||||
val timeOffset = ((eventTime - eventTimeOriginal) / (1000 * 60)).toDouble()
|
||||
binding.time.value = timeOffset
|
||||
if (_binding != null) binding.time.value = timeOffset
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -250,7 +250,8 @@ class CarbsDialog : DialogFragmentWithDate() {
|
|||
val hypoSelected = binding.hypoTt.isChecked
|
||||
if (hypoSelected)
|
||||
actions.add(
|
||||
rh.gs(R.string.temptargetshort) + ": " + (DecimalFormatter.to1Decimal(hypoTT) + " " + unitLabel + " (" + rh.gs(R.string.format_mins, hypoTTDuration) + ")").formatColor( context,
|
||||
rh.gs(R.string.temptargetshort) + ": " + (DecimalFormatter.to1Decimal(hypoTT) + " " + unitLabel + " (" + rh.gs(R.string.format_mins, hypoTTDuration) + ")").formatColor(
|
||||
context,
|
||||
rh,
|
||||
R.attr.tempTargetConfirmation
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue