better check for null
This commit is contained in:
parent
74afdb6874
commit
9d8d925f75
|
@ -97,7 +97,7 @@ public class TempBasalsPlugin implements PluginBase, TempBasalsInterface {
|
|||
|
||||
private void initializeData() {
|
||||
double dia = 3;
|
||||
if (MainApp.getConfigBuilder().getActiveProfile() != null)
|
||||
if (MainApp.getConfigBuilder().getActiveProfile() != null && MainApp.getConfigBuilder().getActiveProfile().getProfile() != null)
|
||||
dia = MainApp.getConfigBuilder().getActiveProfile().getProfile().getDia();
|
||||
long fromMills = (long) (new Date().getTime() - 60 * 60 * 1000L * (24 + dia));
|
||||
tempBasals = MainApp.getDbHelper().getTempbasalsDataFromTime(fromMills, false, false);
|
||||
|
|
|
@ -88,7 +88,7 @@ public class TreatmentsPlugin implements PluginBase, TreatmentsInterface {
|
|||
|
||||
public void initializeData() {
|
||||
double dia = 3;
|
||||
if (MainApp.getConfigBuilder().getActiveProfile() != null)
|
||||
if (MainApp.getConfigBuilder().getActiveProfile() != null && MainApp.getConfigBuilder().getActiveProfile().getProfile() != null)
|
||||
dia = MainApp.getConfigBuilder().getActiveProfile().getProfile().getDia();
|
||||
long fromMills = (long) (new Date().getTime() - 60 * 60 * 1000L * (24 + dia));
|
||||
treatments = MainApp.getDbHelper().getTreatmentDataFromTime(fromMills, false);
|
||||
|
|
Loading…
Reference in a new issue