- fixed NPE in case that we don't have any time from pump (shouldn't happen)
This commit is contained in:
parent
cae5dab285
commit
369c8a5180
|
@ -756,7 +756,11 @@ class MedtronicHistoryData @Inject constructor(
|
|||
}
|
||||
|
||||
var proposedTime = DateTimeUtil.toMillisFromATD(treatment!!.atechDateTime!!)
|
||||
|
||||
// pumpTime should never be null, but it can theoretically happen if reading of time from pump fails
|
||||
if (this.pumpTime!=null) {
|
||||
proposedTime += (this.pumpTime!!.timeDifference * 1000)
|
||||
}
|
||||
|
||||
val proposedTimeDiff : LongArray = longArrayOf(proposedTime-(2*60*1000), proposedTime+(2L*60L*1000L))
|
||||
val tempEntriesList: MutableList<PumpDbEntry> = mutableListOf()
|
||||
|
|
Loading…
Reference in a new issue