diff --git a/pump/pump-common/src/main/java/info/nightscout/pump/common/sync/PumpSyncStorage.kt b/pump/pump-common/src/main/java/info/nightscout/pump/common/sync/PumpSyncStorage.kt index 1de834263e..548fad8665 100644 --- a/pump/pump-common/src/main/java/info/nightscout/pump/common/sync/PumpSyncStorage.kt +++ b/pump/pump-common/src/main/java/info/nightscout/pump/common/sync/PumpSyncStorage.kt @@ -66,8 +66,11 @@ class PumpSyncStorage @Inject constructor( if (jsonData.isNotBlank()) { @Suppress("UNCHECKED_CAST") - pumpSyncStorageTBR = xstream.fromXML(jsonData, MutableList::class.java) as - MutableList + pumpSyncStorageTBR = try { + xstream.fromXML(jsonData, MutableList::class.java) as MutableList + } catch (e: Exception) { + mutableListOf() + } aapsLogger.debug(LTag.PUMP, "Loading Pump Sync Storage: tbrs=${pumpSyncStorageTBR.size}.") aapsLogger.debug(LTag.PUMP, "DD: PumpSyncStorageTBR=$pumpSyncStorageTBR")