fix app crash when no profile set

This commit is contained in:
Milos Kozak 2016-11-11 16:40:31 +01:00
parent c034f77b71
commit b5bd6749ae

View file

@ -486,7 +486,10 @@ public class OverviewFragment extends Fragment {
runningTempView.setVisibility(View.GONE);
}
baseBasalView.setText(DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + " U/h");
activeProfileView.setText(profile.getActiveProfile());
if (profile != null && profile.getActiveProfile() != null)
activeProfileView.setText(profile.getActiveProfile());
activeProfileView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {